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

This commit is contained in:
tidusjar 2023-11-01 16:19:13 +00:00
commit 32da949a95
2 changed files with 3 additions and 5 deletions

View file

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

View file

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