Skip to content

Commit

Permalink
Merge pull request #7 from monoel69/remove_as_user
Browse files Browse the repository at this point in the history
remove as_user from request data
  • Loading branch information
monoel69 authored May 20, 2022
2 parents 0c54c86 + bd46ad5 commit 07c4d33
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions slack_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,19 +602,16 @@ def send_notify(self,
}

if username:
data['as_user'] = False
data['username'] = username
else:
data['as_user'] = True

if text:
data['mrkdwn'] = True
data['text'] = text

if icon_url and not data['as_user']:
if icon_url:
data['icon_url'] = icon_url

if icon_emoji and not data['as_user']:
if icon_emoji:
data['icon_emoji'] = icon_emoji

if blocks:
Expand Down

0 comments on commit 07c4d33

Please sign in to comment.