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

@@ -21,8 +21,8 @@ class Integrations::Slack::ChannelBuilder
end
def find_or_create_channel
exisiting_channel = slack_client.conversations_list.channels.find { |channel| channel['name'] == params[:channel] }
@channel = exisiting_channel || slack_client.conversations_create(name: params[:channel])['channel']
existing_channel = slack_client.conversations_list.channels.find { |channel| channel['name'] == params[:channel] }
@channel = existing_channel || slack_client.conversations_create(name: params[:channel])['channel']
end
def update_reference_id