From 6b47c7b43dca5ebcc80e2b4269f6a70ce91f9d6b Mon Sep 17 00:00:00 2001 From: "Chamath K.B. Attanayaka" <84182411+ChamathKB@users.noreply.github.com> Date: Thu, 29 Sep 2022 01:43:29 +0530 Subject: [PATCH] fix: Attachment not sending to bots message creation (#5353) --- app/services/telegram/incoming_message_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/telegram/incoming_message_service.rb b/app/services/telegram/incoming_message_service.rb index d56e20e8d..a26bda14e 100644 --- a/app/services/telegram/incoming_message_service.rb +++ b/app/services/telegram/incoming_message_service.rb @@ -12,7 +12,7 @@ class Telegram::IncomingMessageService set_contact update_contact_avatar set_conversation - @message = @conversation.messages.create!( + @message = @conversation.messages.build( content: params[:message][:text].presence || params[:message][:caption], account_id: @inbox.account_id, inbox_id: @inbox.id,