chore: Add slack external_source_id for outgoing messages (#1503)

This commit is contained in:
Pranav Raj S
2020-12-10 22:53:49 +05:30
committed by GitHub
parent 1f02c09a41
commit 88c4b63eec
4 changed files with 83 additions and 43 deletions

View File

@@ -2,13 +2,15 @@ class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::Base
before_action :fetch_hook, only: [:update, :destroy]
def create
builder = Integrations::Slack::HookBuilder.new(
account: Current.account,
code: params[:code],
inbox_id: params[:inbox_id]
)
@hook = builder.perform
create_chatwoot_slack_channel
ActiveRecord::Base.transaction do
builder = Integrations::Slack::HookBuilder.new(
account: Current.account,
code: params[:code],
inbox_id: params[:inbox_id]
)
@hook = builder.perform
create_chatwoot_slack_channel
end
end
def update