mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 00:32:57 -07:00
Made a lot of changes around the notifcations to support the custom app name
also started on the welcome email ##1456
This commit is contained in:
parent
8b4c61c065
commit
0cf1aa50e1
21 changed files with 199 additions and 62 deletions
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Ombi.Settings.Settings.Models;
|
||||
using Ombi.Store.Entities;
|
||||
using Ombi.Store.Entities.Requests;
|
||||
|
||||
namespace Ombi.Notifications
|
||||
|
@ -7,8 +9,9 @@ namespace Ombi.Notifications
|
|||
public class NotificationMessageCurlys
|
||||
{
|
||||
|
||||
public void Setup(FullBaseRequest req)
|
||||
public void Setup(FullBaseRequest req, CustomizationSettings s)
|
||||
{
|
||||
ApplicationName = string.IsNullOrEmpty(s.ApplicationName) ? "Ombi" : s.ApplicationName;
|
||||
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
||||
? req.RequestedUser.UserName
|
||||
: req.RequestedUser.Alias;
|
||||
|
@ -20,8 +23,9 @@ namespace Ombi.Notifications
|
|||
PosterImage = req.PosterPath;
|
||||
}
|
||||
|
||||
public void Setup(ChildRequests req)
|
||||
public void Setup(ChildRequests req, CustomizationSettings s)
|
||||
{
|
||||
ApplicationName = string.IsNullOrEmpty(s.ApplicationName) ? "Ombi" : s.ApplicationName;
|
||||
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
||||
? req.RequestedUser.UserName
|
||||
: req.RequestedUser.Alias;
|
||||
|
@ -33,6 +37,12 @@ namespace Ombi.Notifications
|
|||
PosterImage = req.ParentRequest.PosterPath;
|
||||
// DO Episode and Season Lists
|
||||
}
|
||||
|
||||
public void Setup(OmbiUser user, CustomizationSettings s)
|
||||
{
|
||||
ApplicationName = string.IsNullOrEmpty(s.ApplicationName) ? "Ombi" : s.ApplicationName;
|
||||
RequestedUser = user.UserName;
|
||||
}
|
||||
|
||||
// User Defined
|
||||
public string RequestedUser { get; set; }
|
||||
|
@ -45,6 +55,7 @@ namespace Ombi.Notifications
|
|||
public string EpisodesList { get; set; }
|
||||
public string SeasonsList { get; set; }
|
||||
public string PosterImage { get; set; }
|
||||
public string ApplicationName { get; set; }
|
||||
|
||||
// System Defined
|
||||
private string LongDate => DateTime.Now.ToString("D");
|
||||
|
@ -68,6 +79,7 @@ namespace Ombi.Notifications
|
|||
{nameof(EpisodesList),EpisodesList},
|
||||
{nameof(SeasonsList),SeasonsList},
|
||||
{nameof(PosterImage),PosterImage},
|
||||
{nameof(ApplicationName),ApplicationName},
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue