Chore: Web widget Inbox Tech Debts (#738)
* Chore: Webwidget Inbox Tech Debts * Additional customization options creating Web Widget * Changes to edit Page for Web Widget * Remove the WebWidget API end points * Minor chores Address: #680, #502 Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
# Table name: channel_facebook_pages
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# name :string not null
|
||||
# page_access_token :string not null
|
||||
# user_access_token :string not null
|
||||
# created_at :datetime not null
|
||||
@@ -18,23 +17,19 @@
|
||||
#
|
||||
|
||||
class Channel::FacebookPage < ApplicationRecord
|
||||
# FIXME: this should be removed post 1.4 release. we moved avatars to inbox
|
||||
include Avatarable
|
||||
|
||||
self.table_name = 'channel_facebook_pages'
|
||||
|
||||
validates :account_id, presence: true
|
||||
validates :page_id, uniqueness: { scope: :account_id }
|
||||
has_one_attached :avatar
|
||||
belongs_to :account
|
||||
|
||||
has_one :inbox, as: :channel, dependent: :destroy
|
||||
|
||||
before_destroy :unsubscribe
|
||||
|
||||
def name
|
||||
'Facebook'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def unsubscribe
|
||||
|
||||
Reference in New Issue
Block a user