diff --git a/Ombi.Api.Models/Notifications/MattermostNotificationBody.cs b/Ombi.Api.Models/Notifications/MattermostNotificationBody.cs index a179019cd..b804352e0 100644 --- a/Ombi.Api.Models/Notifications/MattermostNotificationBody.cs +++ b/Ombi.Api.Models/Notifications/MattermostNotificationBody.cs @@ -50,5 +50,6 @@ namespace Ombi.Api.Models.Notifications } public string channel { get; set; } public string text { get; set; } + public string icon_url { get; set; } } } \ No newline at end of file diff --git a/Ombi.Core/SettingModels/MattermostNotificationSettings.cs b/Ombi.Core/SettingModels/MattermostNotificationSettings.cs index 3ae1eeb8b..03ae5af3e 100644 --- a/Ombi.Core/SettingModels/MattermostNotificationSettings.cs +++ b/Ombi.Core/SettingModels/MattermostNotificationSettings.cs @@ -8,5 +8,6 @@ namespace Ombi.Core.SettingModels public string WebhookUrl { get; set; } public string Channel { get; set; } public string Username { get; set; } + public string IconUrl { get; set; } } } \ No newline at end of file diff --git a/Ombi.Services/Notification/MattermostNotification.cs b/Ombi.Services/Notification/MattermostNotification.cs index 9d8cdbaf9..708e8df34 100644 --- a/Ombi.Services/Notification/MattermostNotification.cs +++ b/Ombi.Services/Notification/MattermostNotification.cs @@ -125,7 +125,7 @@ namespace Ombi.Services.Notification { try { - var notification = new MattermostNotificationBody { username = config.Username, channel = config.Channel ?? string.Empty, text = message }; + var notification = new MattermostNotificationBody { username = config.Username, channel = config.Channel ?? string.Empty, icon_url = config.IconUrl ?? string.Empty, text = message }; var result = await Api.PushAsync(config.WebhookUrl, notification); if (!result.Equals("ok")) diff --git a/Ombi.UI/Views/Admin/MattermostNotifications.cshtml b/Ombi.UI/Views/Admin/MattermostNotifications.cshtml index 10d04e7c1..b48256319 100644 --- a/Ombi.UI/Views/Admin/MattermostNotifications.cshtml +++ b/Ombi.UI/Views/Admin/MattermostNotifications.cshtml @@ -24,7 +24,7 @@