IMP: handling for empty sent_to in Slack notifs

Better handling when sent_to is not being populated (notification is being broadcast to a channel and not directed to a specific user)
This commit is contained in:
barbequesauce 2018-08-02 11:44:11 -04:00 committed by evilhero
parent eaf1463142
commit 82d14279aa
1 changed files with 4 additions and 1 deletions

View File

@ -488,7 +488,10 @@ class SLACK:
module = ''
module += '[NOTIFIER]'
attachment_text += ' from ' + prov + ' and sent to ' + sent_to
if sent_to is None:
attachment_text += ' from ' + prov
else:
attachment_text += ' from ' + prov + ' and sent to ' + sent_to
payload = {
# "text": text,