feat: Line Channel (#2904)
- Ability to configure line bots as a channel in chatwoot - Receive a message sent to the line bot in chatwoot - Ability to reply to line users from chatwoot fixes: #2738
This commit is contained in:
@@ -15,14 +15,12 @@
|
||||
#
|
||||
|
||||
class Channel::Telegram < ApplicationRecord
|
||||
include Channelable
|
||||
|
||||
self.table_name = 'channel_telegram'
|
||||
EDITABLE_ATTRS = [:bot_token].freeze
|
||||
|
||||
has_one :inbox, as: :channel, dependent: :destroy
|
||||
belongs_to :account
|
||||
|
||||
before_validation :ensure_valid_bot_token, on: :create
|
||||
validates :account_id, presence: true
|
||||
validates :bot_token, presence: true, uniqueness: true
|
||||
before_save :setup_telegram_webhook
|
||||
|
||||
@@ -30,10 +28,6 @@ class Channel::Telegram < ApplicationRecord
|
||||
'Telegram'
|
||||
end
|
||||
|
||||
def has_24_hour_messaging_window?
|
||||
false
|
||||
end
|
||||
|
||||
def telegram_api_url
|
||||
"https://api.telegram.org/bot#{bot_token}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user