Chore: Release Fixes (#3011)
- Fix super admin crashing - Fix error on telegram group messages fixes: #2856
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
# Find the various telegram payload samples here: https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates
|
||||
# https://core.telegram.org/bots/api#available-types
|
||||
|
||||
class Telegram::IncomingMessageService
|
||||
include ::FileTypeHelper
|
||||
pattr_initialize [:inbox!, :params!]
|
||||
|
||||
def perform
|
||||
# chatwoot doesn't support group conversations at the moment
|
||||
return unless private_message?
|
||||
|
||||
set_contact
|
||||
update_contact_avatar
|
||||
set_conversation
|
||||
@@ -20,6 +26,10 @@ class Telegram::IncomingMessageService
|
||||
|
||||
private
|
||||
|
||||
def private_message?
|
||||
params.dig(:message, :chat, :type) == 'private'
|
||||
end
|
||||
|
||||
def account
|
||||
@account ||= inbox.account
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user