This commit is contained in:
Jamie Rees 2020-02-18 22:03:54 +00:00
commit ac51126437
39 changed files with 529 additions and 29 deletions

View file

@ -17,7 +17,9 @@ namespace Ombi.Notifications
public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s, UserNotificationPreferences pref)
{
LoadIssues(opts);
RequestId = req.Id.ToString();
RequestId = req?.Id.ToString();
string title;
if (req == null)
{
@ -68,7 +70,8 @@ namespace Ombi.Notifications
{
LoadIssues(opts);
RequestId = req.Id.ToString();
RequestId = req?.Id.ToString();
string title;
if (req == null)
{
@ -218,6 +221,7 @@ namespace Ombi.Notifications
}
// User Defined
public string RequestId { get; set; }
public string RequestedUser { get; set; }
public string UserName { get; set; }
public string IssueUser => UserName;
@ -241,7 +245,6 @@ namespace Ombi.Notifications
public string UserPreference { get; set; }
public string DenyReason { get; set; }
public string AvailableDate { get; set; }
public string RequestId { get; set; }
// System Defined
private string LongDate => DateTime.Now.ToString("D");
@ -251,6 +254,7 @@ namespace Ombi.Notifications
public Dictionary<string, string> Curlys => new Dictionary<string, string>
{
{nameof(RequestId), RequestId },
{nameof(RequestedUser), RequestedUser },
{nameof(Title), Title },
{nameof(RequestedDate), RequestedDate },