671c5c931f
- Ability to configure telegram bots as a channel in chatwoot - Receive a message sent to the telegram bot in chatwoot - Ability to reply to telegram users from chatwoot - Receive attachment messages in chatwoot fixes: #1843
12 lines
368 B
Ruby
12 lines
368 B
Ruby
class Webhooks::TelegramEventsJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(params = {})
|
|
return unless params[:bot_token]
|
|
|
|
channel = Channel::Telegram.find_by(bot_token: params[:bot_token])
|
|
return unless channel
|
|
|
|
Telegram::IncomingMessageService.new(inbox: channel.inbox, params: params['telegram'].with_indifferent_access).perform
|
|
end
|
|
end
|