Chore: Routine Bugfixes and enhancements (#979)
- Fix slack scopes - Docs for authentication Fixes: #704 , #973
This commit is contained in:
@@ -17,10 +17,7 @@ class Integrations::Slack::ChannelBuilder
|
||||
end
|
||||
|
||||
def slack_client
|
||||
Slack.configure do |config|
|
||||
config.token = hook.access_token
|
||||
end
|
||||
Slack::Web::Client.new
|
||||
@slack_client ||= Slack::Web::Client.new(token: hook.access_token)
|
||||
end
|
||||
|
||||
def find_or_create_channel
|
||||
@@ -29,6 +26,7 @@ class Integrations::Slack::ChannelBuilder
|
||||
end
|
||||
|
||||
def update_reference_id
|
||||
@hook.update(reference_id: channel['id'])
|
||||
slack_client.conversations_join(channel: channel[:id])
|
||||
@hook.update(reference_id: channel[:id])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user