diff options
| author | Patrick Barron <18354464+barronpm@users.noreply.github.com> | 2020-05-12 16:08:28 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-12 16:08:28 +0000 |
| commit | 6379391f871424177c6048a54ccd061d6e44bc4a (patch) | |
| tree | cf268efbe2d8aaeee964ef8e893ae382abf88ad4 /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | 37dcbfbc3980ed962c28fe7f1ee9d8a78f65ec19 (diff) | |
| parent | 32c118222647f121c0b17055c0ef158763c0b5d2 (diff) | |
Merge branch 'master' into activitydb-efcore
Diffstat (limited to 'MediaBrowser.Model/Notifications/NotificationOptions.cs')
| -rw-r--r-- | MediaBrowser.Model/Notifications/NotificationOptions.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 79a128e9be..9c54bd70e0 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System; -using MediaBrowser.Model.Extensions; +using System.Linq; using MediaBrowser.Model.Users; namespace MediaBrowser.Model.Notifications @@ -81,8 +81,12 @@ namespace MediaBrowser.Model.Notifications { foreach (NotificationOption i in Options) { - if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) return i; + if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) + { + return i; + } } + return null; } @@ -98,7 +102,7 @@ namespace MediaBrowser.Model.Notifications NotificationOption opt = GetOptions(notificationType); return opt == null || - !ListHelper.ContainsIgnoreCase(opt.DisabledServices, service); + !opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase); } public bool IsEnabledToMonitorUser(string type, Guid userId) @@ -106,7 +110,7 @@ namespace MediaBrowser.Model.Notifications NotificationOption opt = GetOptions(type); return opt != null && opt.Enabled && - !ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString("")); + !opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase); } public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy) @@ -125,7 +129,7 @@ namespace MediaBrowser.Model.Notifications return true; } - return ListHelper.ContainsIgnoreCase(opt.SendToUsers, userId); + return opt.SendToUsers.Contains(userId, StringComparer.OrdinalIgnoreCase); } return false; |
