Merge pull request #218 from wkf/patch-1

Allow sending direct messages with slack module
reviewable/pr18780/r1
Brian Coca 10 years ago
commit 18711b32a9

@ -141,7 +141,10 @@ def build_payload_for_slack(module, text, channel, username, icon_url, icon_emoj
else:
payload = dict(attachments=[dict(text=text, color=color)])
if channel is not None:
payload['channel'] = channel if (channel[0] == '#') else '#'+channel
if (channel[0] == '#') or (channel[0] == '@')
payload['channel'] = channel
else
payload['channel'] = '#'+channel
if username is not None:
payload['username'] = username
if icon_emoji is not None:

Loading…
Cancel
Save