feat: Telegram Channel (#2901)
- 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
This commit is contained in:
12
app/jobs/webhooks/telegram_events_job.rb
Normal file
12
app/jobs/webhooks/telegram_events_job.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user