aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-07-23 10:34:32 +0200
committerGitHub <noreply@github.com>2020-07-23 10:34:32 +0200
commit944fdb4c621fa2b65e970554d4e4daf7841a7a93 (patch)
tree22b781b665dddd84c58b8422e636c1cbaaad4f06
parent6de6583cbd40d1c11339bacc5fec162d57edfd6b (diff)
parent6b4cea604ce9128b6d306e010035c14f6cb75ec4 (diff)
Merge pull request #3552 from BaronGreenback/NotificationFix
Fixes #3551 (Notifications Serialization error)
-rw-r--r--MediaBrowser.Model/Notifications/NotificationOption.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.cs
index ea363d9b1..58aecb3d3 100644
--- a/MediaBrowser.Model/Notifications/NotificationOption.cs
+++ b/MediaBrowser.Model/Notifications/NotificationOption.cs
@@ -1,3 +1,4 @@
+#pragma warning disable CA1819 // Properties should not return arrays
#pragma warning disable CS1591
using System;
@@ -9,21 +10,27 @@ namespace MediaBrowser.Model.Notifications
public NotificationOption(string type)
{
Type = type;
+ DisabledServices = Array.Empty<string>();
+ DisabledMonitorUsers = Array.Empty<string>();
+ SendToUsers = Array.Empty<string>();
+ }
+ public NotificationOption()
+ {
DisabledServices = Array.Empty<string>();
DisabledMonitorUsers = Array.Empty<string>();
SendToUsers = Array.Empty<string>();
}
- public string Type { get; set; }
+ public string? Type { get; set; }
/// <summary>
- /// User Ids to not monitor (it's opt out).
+ /// Gets or sets user Ids to not monitor (it's opt out).
/// </summary>
public string[] DisabledMonitorUsers { get; set; }
/// <summary>
- /// User Ids to send to (if SendToUserMode == Custom)
+ /// Gets or sets user Ids to send to (if SendToUserMode == Custom).
/// </summary>
public string[] SendToUsers { get; set; }