mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Reworked the custom notifications... again. Need to figure out how to find the view to the model
This commit is contained in:
parent
f0ce5556c3
commit
a19e81d1f8
6 changed files with 112 additions and 35 deletions
|
@ -38,10 +38,11 @@ namespace PlexRequests.Core
|
|||
private const char EndChar = (char)125;
|
||||
public NotificationMessageContent ParseMessage<T>(T notification, NotificationType type, NotificationMessageCurlys c) where T : NotificationSettings
|
||||
{
|
||||
var content = notification.Message.FirstOrDefault(x => x.Key == type).Value;
|
||||
|
||||
//if (string.IsNullOrEmpty(notificationToParse))
|
||||
// return string.Empty;
|
||||
var content = notification.Message.FirstOrDefault(x => x.NotificationType == type);
|
||||
if (content == null)
|
||||
{
|
||||
return new NotificationMessageContent();
|
||||
}
|
||||
|
||||
return Resolve(content.Body, content.Subject, c.Curlys);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue