diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
| commit | 2c86bd1875e6e85d5867618e992d850453dae663 (patch) | |
| tree | 671070fb246fd3821bf6f1e58a01c402a2f969d1 /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | dd5f90802e71083347b6095eb79a9de0b9d34615 (diff) | |
| parent | 3cb7fe50127b1a8158186b390836ee25ae5a50fd (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'MediaBrowser.Model/Notifications/NotificationOptions.cs')
| -rw-r--r-- | MediaBrowser.Model/Notifications/NotificationOptions.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index d1b5491bd..804f51e16 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -86,14 +86,14 @@ namespace MediaBrowser.Model.Notifications { NotificationOption opt = GetOptions(type); - return opt != null && opt.Enabled; + return opt is not null && opt.Enabled; } public bool IsServiceEnabled(string service, string notificationType) { NotificationOption opt = GetOptions(notificationType); - return opt == null + return opt is null || !opt.DisabledServices.Contains(service, StringComparison.OrdinalIgnoreCase); } @@ -101,7 +101,7 @@ namespace MediaBrowser.Model.Notifications { NotificationOption opt = GetOptions(type); - return opt != null + return opt is not null && opt.Enabled && !opt.DisabledMonitorUsers.Contains(userId.ToString("N"), StringComparison.OrdinalIgnoreCase); } @@ -110,7 +110,7 @@ namespace MediaBrowser.Model.Notifications { NotificationOption opt = GetOptions(type); - if (opt != null && opt.Enabled) + if (opt is not null && opt.Enabled) { if (opt.SendToUserMode == SendToUserType.All) { |
