Chore: APIs for agent bots (#676)

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Sojan Jose
2020-04-07 10:41:18 +05:30
committed by GitHub
parent 4feca1d88d
commit 1cfa756d49
14 changed files with 277 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ class Inbox < ApplicationRecord
has_many :messages, through: :conversations
has_one :agent_bot_inbox, dependent: :destroy
has_one :agent_bot, through: :agent_bot_inbox
has_many :webhooks, dependent: :destroy
after_create :subscribe_webhook, if: :facebook?