From 197febe9dba44846b40a2798f58b4987fb38289f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 5 Jul 2017 09:16:50 -0700 Subject: [PATCH] Fixed: Sending Slack notifications without an icon --- src/NzbDrone.Core/Notifications/Slack/Slack.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Slack/Slack.cs b/src/NzbDrone.Core/Notifications/Slack/Slack.cs index a51b6b939..cbb0cb975 100644 --- a/src/NzbDrone.Core/Notifications/Slack/Slack.cs +++ b/src/NzbDrone.Core/Notifications/Slack/Slack.cs @@ -115,14 +115,17 @@ namespace NzbDrone.Core.Notifications.Slack Attachments = attachments }; - // Set the correct icon based on the value - if (icon.StartsWith(":") && icon.EndsWith(":")) + if (icon.IsNotNullOrWhiteSpace()) { - payload.IconEmoji = icon; - } - else if (icon.IsNotNullOrWhiteSpace()) - { - payload.IconUrl = icon; + // Set the correct icon based on the value + if (icon.StartsWith(":") && icon.EndsWith(":")) + { + payload.IconEmoji = icon; + } + else + { + payload.IconUrl = icon; + } } return payload;