Fixed: Sending Slack notifications without an icon
This commit is contained in:
parent
e10717f6bb
commit
197febe9db
|
@ -115,15 +115,18 @@ namespace NzbDrone.Core.Notifications.Slack
|
||||||
Attachments = attachments
|
Attachments = attachments
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (icon.IsNotNullOrWhiteSpace())
|
||||||
|
{
|
||||||
// Set the correct icon based on the value
|
// Set the correct icon based on the value
|
||||||
if (icon.StartsWith(":") && icon.EndsWith(":"))
|
if (icon.StartsWith(":") && icon.EndsWith(":"))
|
||||||
{
|
{
|
||||||
payload.IconEmoji = icon;
|
payload.IconEmoji = icon;
|
||||||
}
|
}
|
||||||
else if (icon.IsNotNullOrWhiteSpace())
|
else
|
||||||
{
|
{
|
||||||
payload.IconUrl = icon;
|
payload.IconUrl = icon;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue