fix(discord): 🐛 Fixed an issue where the Icon in the discord notifications wouldn't apply

snyk-upgrade-8f7009303888573a05cbc8347a44f5cd
tidusjar 1 year ago
parent 7bc915cc14
commit 32da949a95

@ -7,6 +7,7 @@ namespace Ombi.Api.Discord.Models
{
public string content { get; set; }
public string username { get; set; }
public string avatar_url { get; set; }
public List<DiscordEmbeds> embeds { get; set; }
}
@ -32,7 +33,6 @@ namespace Ombi.Api.Discord.Models
{
public string name { get; set; }
public string url { get; set; }
public string iconurl { get; set; }
}
public class DiscordField

@ -108,6 +108,7 @@ namespace Ombi.Notifications.Agents
{
content = model.Message,
username = settings.Username ?? "Ombi",
avatar_url = settings.Icon.HasValue() ? settings.Icon : string.Empty
};
var fields = new List<DiscordField>();
@ -157,10 +158,7 @@ namespace Ombi.Notifications.Agents
}
}
var author = new DiscordAuthor
{
iconurl = settings.Icon.HasValue() ? settings.Icon : string.Empty
};
var author = new DiscordAuthor();
if (model.Data.TryGetValue("ApplicationUrl", out var appUrl))
{

Loading…
Cancel
Save