feat: Disable attachments and emoji picker in the web widget (#1102)

Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Pranav Raj S
2020-08-05 17:46:17 +05:30
committed by GitHub
parent 3b23aa7913
commit db877453a4
23 changed files with 422 additions and 141 deletions

View File

@@ -3,6 +3,7 @@
# Table name: channel_web_widgets
#
# id :integer not null, primary key
# feature_flags :integer default(3), not null
# website_token :string
# website_url :string
# welcome_tagline :string
@@ -18,6 +19,8 @@
#
class Channel::WebWidget < ApplicationRecord
include FlagShihTzu
self.table_name = 'channel_web_widgets'
validates :website_url, presence: true
@@ -26,6 +29,9 @@ class Channel::WebWidget < ApplicationRecord
belongs_to :account
has_one :inbox, as: :channel, dependent: :destroy
has_secure_token :website_token
has_flags 1 => :attachments,
2 => :emoji_picker,
:column => 'feature_flags'
def has_24_hour_messaging_window?
false