Feature: Webhooks (#489)

This commit is contained in:
Subin T P
2020-02-14 23:19:17 +05:30
committed by GitHub
parent 79a847aeab
commit 919261d843
29 changed files with 566 additions and 214 deletions

View File

@@ -32,6 +32,7 @@ class Inbox < ApplicationRecord
has_many :members, through: :inbox_members, source: :user
has_many :conversations, dependent: :destroy
has_many :messages, through: :conversations
has_one :webhook, dependent: :destroy
after_create :subscribe_webhook, if: :facebook?
after_destroy :delete_round_robin_agents