Skip to content

Commit

Permalink
fix(discord): 🐛 Fixed an issue where the Icon in the discord notifica…
Browse files Browse the repository at this point in the history
…tions wouldn't apply
  • Loading branch information
tidusjar committed Nov 1, 2023
1 parent 7bc915c commit 32da949
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Ombi.Api.Discord/Models/DiscordWebhookBody.cs
Expand Up @@ -7,6 +7,7 @@ public class DiscordWebhookBody
{
public string content { get; set; }
public string username { get; set; }
public string avatar_url { get; set; }
public List<DiscordEmbeds> embeds { get; set; }
}

Expand All @@ -32,7 +33,6 @@ public class DiscordAuthor
{
public string name { get; set; }
public string url { get; set; }
public string iconurl { get; set; }
}

public class DiscordField
Expand Down
6 changes: 2 additions & 4 deletions src/Ombi.Notifications/Agents/DiscordNotification.cs
Expand Up @@ -108,6 +108,7 @@ protected override async Task Send(NotificationMessage model, DiscordNotificatio
{
content = model.Message,
username = settings.Username ?? "Ombi",
avatar_url = settings.Icon.HasValue() ? settings.Icon : string.Empty
};

var fields = new List<DiscordField>();
Expand Down Expand Up @@ -157,10 +158,7 @@ protected override async Task Send(NotificationMessage model, DiscordNotificatio
}
}

var author = new DiscordAuthor
{
iconurl = settings.Icon.HasValue() ? settings.Icon : string.Empty
};
var author = new DiscordAuthor();

if (model.Data.TryGetValue("ApplicationUrl", out var appUrl))
{
Expand Down

0 comments on commit 32da949

Please sign in to comment.