feat: Add a view for mentions (#3505)

- Added a new table mentions for saving user mentions
- Added a filter conversation_type in the API
- Added a view to see the mentions
This commit is contained in:
Pranav Raj S
2021-12-08 21:50:14 -08:00
committed by GitHub
parent 1db82f235d
commit 2be71e73dc
28 changed files with 389 additions and 98 deletions

View File

@@ -35,37 +35,38 @@ class Account < ApplicationRecord
has_many :account_users, dependent: :destroy_async
has_many :agent_bot_inboxes, dependent: :destroy_async
has_many :agent_bots, dependent: :destroy_async
has_many :csat_survey_responses, dependent: :destroy_async
has_many :data_imports, dependent: :destroy_async
has_many :users, through: :account_users
has_many :inboxes, dependent: :destroy_async
has_many :notes, dependent: :destroy_async
has_many :api_channels, dependent: :destroy_async, class_name: '::Channel::Api'
has_many :campaigns, dependent: :destroy_async
has_many :conversations, dependent: :destroy_async
has_many :messages, dependent: :destroy_async
has_many :canned_responses, dependent: :destroy_async
has_many :contacts, dependent: :destroy_async
has_many :conversations, dependent: :destroy_async
has_many :csat_survey_responses, dependent: :destroy_async
has_many :custom_attribute_definitions, dependent: :destroy_async
has_many :custom_filters, dependent: :destroy_async
has_many :data_imports, dependent: :destroy_async
has_many :email_channels, dependent: :destroy_async, class_name: '::Channel::Email'
has_many :facebook_pages, dependent: :destroy_async, class_name: '::Channel::FacebookPage'
has_many :hooks, dependent: :destroy_async, class_name: 'Integrations::Hook'
has_many :inboxes, dependent: :destroy_async
has_many :kbase_articles, dependent: :destroy_async, class_name: '::Kbase::Article'
has_many :kbase_categories, dependent: :destroy_async, class_name: '::Kbase::Category'
has_many :kbase_portals, dependent: :destroy_async, class_name: '::Kbase::Portal'
has_many :labels, dependent: :destroy_async
has_many :line_channels, dependent: :destroy_async, class_name: '::Channel::Line'
has_many :mentions, dependent: :destroy_async
has_many :messages, dependent: :destroy_async
has_many :notes, dependent: :destroy_async
has_many :notification_settings, dependent: :destroy_async
has_many :teams, dependent: :destroy_async
has_many :telegram_bots, dependent: :destroy_async
has_many :telegram_channels, dependent: :destroy_async, class_name: '::Channel::Telegram'
has_many :twilio_sms, dependent: :destroy_async, class_name: '::Channel::TwilioSms'
has_many :twitter_profiles, dependent: :destroy_async, class_name: '::Channel::TwitterProfile'
has_many :users, through: :account_users
has_many :web_widgets, dependent: :destroy_async, class_name: '::Channel::WebWidget'
has_many :email_channels, dependent: :destroy_async, class_name: '::Channel::Email'
has_many :api_channels, dependent: :destroy_async, class_name: '::Channel::Api'
has_many :line_channels, dependent: :destroy_async, class_name: '::Channel::Line'
has_many :telegram_channels, dependent: :destroy_async, class_name: '::Channel::Telegram'
has_many :whatsapp_channels, dependent: :destroy_async, class_name: '::Channel::Whatsapp'
has_many :canned_responses, dependent: :destroy_async
has_many :webhooks, dependent: :destroy_async
has_many :labels, dependent: :destroy_async
has_many :notification_settings, dependent: :destroy_async
has_many :hooks, dependent: :destroy_async, class_name: 'Integrations::Hook'
has_many :whatsapp_channels, dependent: :destroy_async, class_name: '::Channel::Whatsapp'
has_many :working_hours, dependent: :destroy_async
has_many :kbase_portals, dependent: :destroy_async, class_name: '::Kbase::Portal'
has_many :kbase_categories, dependent: :destroy_async, class_name: '::Kbase::Category'
has_many :kbase_articles, dependent: :destroy_async, class_name: '::Kbase::Article'
has_many :teams, dependent: :destroy_async
has_many :custom_filters, dependent: :destroy_async
has_many :custom_attribute_definitions, dependent: :destroy_async
has_flags ACCOUNT_SETTINGS_FLAGS.merge(column: 'settings_flags').merge(DEFAULT_QUERY_SETTING)