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

Slack notifications fails on private channel #623

Closed
MartinDelille opened this issue Jan 30, 2016 · 19 comments
Closed

Slack notifications fails on private channel #623

MartinDelille opened this issue Jan 30, 2016 · 19 comments
Labels
Milestone

Comments

@MartinDelille
Copy link

I tried to set up Slash notification to my private channel using the following configuration (xxxxxx is my token encrypted here:

notifications:
  - provider: Slack
    channel: dev
    auth_token:
      secure: xxxxxx

My Appveyor build show me the folloing error:

Error sending Slack notification: Error sending Slack message: channel_not_found

When testing the Slash api with the following URL, it works: https://slack.com/api/chat.postMessage?token=xxxxxx&channel=dev&text=hello&pretty=1 (where xxxxxx is my token without encryption).

It also works if the channel is not private.

@FeodorFitsner
Copy link
Member

Thanks for reporting about that. Will fix that shortly.

@FeodorFitsner FeodorFitsner added this to the deploy-2 milestone Jan 30, 2016
@FeodorFitsner
Copy link
Member

The problem was AppVeyor always adding # to channel name thus making it work with public channels only.

@MartinDelille
Copy link
Author

Ok let me know when it's available, I'll test it right away!

@FeodorFitsner
Copy link
Member

Update with fix has been deployed.

@MartinDelille
Copy link
Author

It works like a charm!

@Jeavon
Copy link

Jeavon commented Feb 1, 2016

To check, this means we need to update all channel properties to include the # where we didn't need them previously?

@FeodorFitsner
Copy link
Member

Yes, correct.

lukemcgregor added a commit to Smartrak/Smartrak.Library that referenced this issue Feb 1, 2016
@PureKrome
Copy link

@FeodorFitsner We're still having problems with this.

I'm looking at some oldish AV-project and clicked EXPORT YAML.

this is the output...

notifications:
- provider: Slack
  auth_token:
    secure: <snipped>
  channel: dev-cd
  on_build_success: true
  on_build_failure: true
  on_build_status_changed: false

the channel is dev-cd in that output. not #dev-cd.

What should we be doing for the channel name, please? I'm confused 😢 😊

@FeodorFitsner
Copy link
Member

Is it a public or private channel?

@PureKrome
Copy link

out (company) slack is invite only? is that private, then?

once you're inside our slack, anyone can join then #dev-cd channel.

@FeodorFitsner
Copy link
Member

OK, then in appveyor.yml it should be:

channel: '#dev-cd'

@PureKrome
Copy link

we had that originally and we were getting that error message. so then i added the # and we're still getting the error message.

EDIT: Note. this is a new thing. started happening a month ago? (Jan 2016?) before that, it's been running great for ages.

@FeodorFitsner
Copy link
Member

What error do you get? Make sure channel name is in quotes if starts with #.

@PureKrome
Copy link

So is this correct?

  • channels are public: channel: dev <-- notice no quotes
  • direct messages are private: channel: '#my-private-channel' <-- notice quotes and #

@PureKrome
Copy link

or is it like this....

image

the padlocks are private?

(and i'm guessing direct messages are not a channel .. which is why they are in a different column, so they are not part of this topic).

@FeodorFitsner
Copy link
Member

Correct, channel with lock sign is private.

@PureKrome
Copy link

Awesome. so when do we add the # again? to private (padlocked) channels only? Any channel?

@FeodorFitsner
Copy link
Member

"#" is added to non-private (non-padlocked) channels only.

@PureKrome
Copy link

k. soz.

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

No branches or pull requests

4 participants