This commit is contained in:
parent
99763bc91d
commit
bfbc0bd458
1 changed files with 2 additions and 1 deletions
|
@ -171,7 +171,8 @@ def build_payload_for_slack(module, text, channel, username, icon_url, icon_emoj
|
||||||
if color == "normal" and text is not None:
|
if color == "normal" and text is not None:
|
||||||
payload = dict(text=text)
|
payload = dict(text=text)
|
||||||
elif text is not None:
|
elif text is not None:
|
||||||
payload = dict(attachments=[dict(text=text, color=color)])
|
# With a custom color we have to set the message as attachment, and explicitely turn markdown parsing on for it.
|
||||||
|
payload = dict(attachments=[dict(text=text, color=color, mrkdwn_in=["text"])])
|
||||||
if channel is not None:
|
if channel is not None:
|
||||||
if (channel[0] == '#') or (channel[0] == '@'):
|
if (channel[0] == '#') or (channel[0] == '@'):
|
||||||
payload['channel'] = channel
|
payload['channel'] = channel
|
||||||
|
|
Loading…
Reference in a new issue