mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 00:32:57 -07:00
Did the notification side of things with the custom user defined preference !wip
This commit is contained in:
parent
de2e3abfe0
commit
8573b7c729
12 changed files with 41 additions and 22 deletions
|
@ -14,9 +14,10 @@ namespace Ombi.Notifications
|
|||
{
|
||||
public class NotificationMessageCurlys
|
||||
{
|
||||
public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s)
|
||||
public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s, UserNotificationPreferences pref)
|
||||
{
|
||||
LoadIssues(opts);
|
||||
UserPreference = pref.Enabled ? pref.Value : string.Empty;
|
||||
string title;
|
||||
if (req == null)
|
||||
{
|
||||
|
@ -58,9 +59,10 @@ namespace Ombi.Notifications
|
|||
AdditionalInformation = opts?.AdditionalInformation ?? string.Empty;
|
||||
}
|
||||
|
||||
public void Setup(NotificationOptions opts, AlbumRequest req, CustomizationSettings s)
|
||||
public void Setup(NotificationOptions opts, AlbumRequest req, CustomizationSettings s, UserNotificationPreferences pref)
|
||||
{
|
||||
LoadIssues(opts);
|
||||
UserPreference = pref.Enabled ? pref.Value : string.Empty;
|
||||
string title;
|
||||
if (req == null)
|
||||
{
|
||||
|
@ -101,9 +103,10 @@ namespace Ombi.Notifications
|
|||
Alias = username.Alias.HasValue() ? username.Alias : username.UserName;
|
||||
}
|
||||
|
||||
public void Setup(NotificationOptions opts, ChildRequests req, CustomizationSettings s)
|
||||
public void Setup(NotificationOptions opts, ChildRequests req, CustomizationSettings s, UserNotificationPreferences pref)
|
||||
{
|
||||
LoadIssues(opts);
|
||||
UserPreference = pref.Enabled ? pref.Value : string.Empty;
|
||||
string title;
|
||||
if (req == null)
|
||||
{
|
||||
|
@ -221,6 +224,7 @@ namespace Ombi.Notifications
|
|||
public string IssueStatus { get; set; }
|
||||
public string IssueSubject { get; set; }
|
||||
public string NewIssueComment { get; set; }
|
||||
public string UserPreference { get; set; }
|
||||
|
||||
// System Defined
|
||||
private string LongDate => DateTime.Now.ToString("D");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue