feat: notify on slack disconnect (#1323)

This commit is contained in:
Abhishek
2020-10-28 02:52:57 +08:00
committed by GitHub
parent 9045b8d9ca
commit ff96d43953
6 changed files with 58 additions and 7 deletions

View File

@@ -15,6 +15,8 @@
# reference_id :string
#
class Integrations::Hook < ApplicationRecord
include Reauthorizable
validates :account_id, presence: true
validates :app_id, presence: true
@@ -33,4 +35,8 @@ class Integrations::Hook < ApplicationRecord
def slack?
app_id == 'slack'
end
def disable
update(status: 'disabled')
end
end