Jelajahi Sumber

Merge pull request #5860 from cvium/fix-notification-user-list

Fix notification disabled users list

(cherry picked from commit ebe8301404332667f95e230bdb2a0f154778059d)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Bond-009 4 tahun lalu
induk
melakukan
1ec247f5d8
1 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 5 4
      MediaBrowser.Model/Notifications/NotificationOptions.cs

+ 5 - 4
MediaBrowser.Model/Notifications/NotificationOptions.cs

@@ -95,16 +95,17 @@ namespace MediaBrowser.Model.Notifications
         {
         {
             NotificationOption opt = GetOptions(notificationType);
             NotificationOption opt = GetOptions(notificationType);
 
 
-            return opt == null ||
-                   !opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase);
+            return opt == null
+                   || !opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase);
         }
         }
 
 
         public bool IsEnabledToMonitorUser(string type, Guid userId)
         public bool IsEnabledToMonitorUser(string type, Guid userId)
         {
         {
             NotificationOption opt = GetOptions(type);
             NotificationOption opt = GetOptions(type);
 
 
-            return opt != null && opt.Enabled &&
-                   !opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase);
+            return opt != null
+                   && opt.Enabled
+                   && !opt.DisabledMonitorUsers.Contains(userId.ToString("N"), StringComparer.OrdinalIgnoreCase);
         }
         }
 
 
         public bool IsEnabledToSendToUser(string type, string userId, User user)
         public bool IsEnabledToSendToUser(string type, string userId, User user)