mirror of
https://github.com/Radarr/Radarr
synced 2026-03-04 11:32:23 +01:00
Fixed: Sending Slack notifications without an icon
This commit is contained in:
parent
e10717f6bb
commit
197febe9db
1 changed files with 10 additions and 7 deletions
|
|
@ -115,14 +115,17 @@ private SlackPayload CreatePayload(string message, List<Attachment> attachments
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue