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

modules.slack.post_message: Allow sending messages to direct-message … #34983

Merged

Conversation

eliasp
Copy link
Contributor

@eliasp eliasp commented Jul 27, 2016

What does this PR do?

It enables salt.modules.slack.post_message to also send messages to personal/direct-message channels whose name doesn't start with # but @ instead.

What issues does this PR fix or reference?

none

Previous Behavior

The message never arrived in the desired channel, although the module reported success (which is another issue I'm going to fix) as it converted a channel name like @eliasp to #@eliasp.

New Behavior

It accepts now a channel name like @eliasp and only prepends a # as a fallback in case the channel name neither starts with @ nor #.

Tests written?

No

@cachedout
Copy link
Contributor

@eliasp Looks good. Could you just fix one little lint warning? https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/3669/violations/file/salt/modules/slack_notify.py/

Then we'll get this in. Thanks.

@eliasp eliasp force-pushed the 2016.3-salt.modules.slack-allow-sending-dms branch from a531f2f to fe0952a Compare July 27, 2016 19:48
@eliasp
Copy link
Contributor Author

eliasp commented Jul 27, 2016

Fixed

@rallytime rallytime merged commit 32d0f39 into saltstack:2016.3 Jul 27, 2016
@eliasp eliasp deleted the 2016.3-salt.modules.slack-allow-sending-dms branch July 27, 2016 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants