Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The JoinChannel api call is fully deprecated for new Slack applications #726

Closed
spkane opened this issue Jul 2, 2020 · 6 comments · Fixed by #777
Closed

The JoinChannel api call is fully deprecated for new Slack applications #726

spkane opened this issue Jul 2, 2020 · 6 comments · Fixed by #777
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@spkane
Copy link

spkane commented Jul 2, 2020

Describe the bug
Slack has deprecated the channels.join api call and suggests to use conversations.join instead. API calls now return with method_deprecated for JoinChannel when you are using a Slack app created after June 10th (or so).

Slack API links:
https://api.slack.com/methods/channels.join
https://api.slack.com/methods/conversations.join

Code:

_, err = api.JoinChannel(channel)

To Reproduce

  1. Create a new slack app
  2. Try to use it with argo event Slack Triggers. You will get an error when argo events tries to send a message to Slack.

Expected behavior

  1. argo-events should be able to send a message using both older and newer Slack Apps.

Environment (please complete the following information):

  • OS: Linux (Kubernetes)

Additional context

JoinConversation is already written in the Slack package: https://github.com/slack-go/slack/blob/c664c83937182df61c6532cff2569ad50ec6b117/conversation.go#L536

JoinCoversation requires a channel id instead of channel name. This is different then the current call which expects a name. For backwards compatibility it would make sense to still expect a name and then lookup the ID and pass it to JoinConversation.

Note: github.com/slack-go/slack is the new community fork of github.com/nlopes/slack and is most likely what should be used going forward.

@spkane
Copy link
Author

spkane commented Jul 2, 2020

cc/ @lucassha

@spkane
Copy link
Author

spkane commented Jul 2, 2020

At the bare minimum, this code change fixes things:

sensors/triggers/slack/slack.go
114:	_, _, _, err = api.JoinConversation(channel)

@whynowy whynowy added the enhancement New feature or request label Jul 15, 2020
@aeweidne
Copy link

Did you need to change the log level to get the error? I am seeing my Slack trigger fail silently on v0.16.0 but it is definitely getting the event from the gateway

@spkane
Copy link
Author

spkane commented Jul 17, 2020

@shimmerjs I don't think so, but it couldn't hurt. I am pretty sure that we at least got a warning that the call was deprecated. However, if your Slack app is new then this is almost certainly your issue. We are running a fork at the moment to work around it while we are testing.

@whynowy
Copy link
Member

whynowy commented Jul 28, 2020

@spkane - Would you like to help do a testing with the change? I can give you RC images.

@spkane
Copy link
Author

spkane commented Jul 28, 2020

@whynowy Yes. I'd be happy to give it a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants