mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
fix a bug that broke bot avatars for Slack notifications
when a *color* is specified for a Slack notification template, we use the *web* not the RTM API; when you use a bot with the web API, you have to specify the `as_user=True` argument to have the message use the bot's name and avatar see: https://github.com/ansible/tower/issues/2883 see: https://github.com/ansible/awx/issues/2187
This commit is contained in:
parent
5cdd947196
commit
4bc63cc37e
@ -69,6 +69,7 @@ class SlackBackend(AWXBaseEmailBackend):
|
||||
r = r[1:]
|
||||
ret = connection.api_call("chat.postMessage",
|
||||
channel=r,
|
||||
as_user=True,
|
||||
attachments=[{
|
||||
"color": self.color,
|
||||
"text": m.subject
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user