diff --git a/lib/integrations/dialogflow/processor_service.rb b/lib/integrations/dialogflow/processor_service.rb index cb75bc78f..e382c5046 100644 --- a/lib/integrations/dialogflow/processor_service.rb +++ b/lib/integrations/dialogflow/processor_service.rb @@ -3,7 +3,7 @@ class Integrations::Dialogflow::ProcessorService def perform message = event_data[:message] - return if message.private? + return if message.is_private_note? return unless processable_message?(message) return unless message.conversation.bot? diff --git a/spec/lib/integrations/dialogflow/processor_service_spec.rb b/spec/lib/integrations/dialogflow/processor_service_spec.rb index ca852a943..fe4788b57 100644 --- a/spec/lib/integrations/dialogflow/processor_service_spec.rb +++ b/spec/lib/integrations/dialogflow/processor_service_spec.rb @@ -63,7 +63,7 @@ describe Integrations::Dialogflow::ProcessorService do end context 'when message is private' do - let(:message) { create(:message, account: account, conversation: conversation, private: true) } + let(:message) { create(:message, account: account, conversation: conversation, is_private_note: true) } it 'returns nil' do expect(processor.perform).to be(nil)