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 GitHub
parent 4350d701e8
commit 56c5a7820f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,