diff options
| author | crobibero <cody@robibe.ro> | 2020-06-14 20:15:26 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-14 20:15:26 -0600 |
| commit | 589735f60ce36197be9d1c4609b0ee6e3fd3c291 (patch) | |
| tree | c5dad758fee4f4eb7727780fd7eab0fa60630a71 /Emby.Notifications/NotificationManager.cs | |
| parent | e2b2f74b47cc1d281c0819795b83f8d49d1f3b09 (diff) | |
| parent | f026a1d7217c69b4eeadd258980e254702f6dde6 (diff) | |
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'Emby.Notifications/NotificationManager.cs')
| -rw-r--r-- | Emby.Notifications/NotificationManager.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Notifications/NotificationManager.cs b/Emby.Notifications/NotificationManager.cs index 2792a8f0b..8b281e487 100644 --- a/Emby.Notifications/NotificationManager.cs +++ b/Emby.Notifications/NotificationManager.cs @@ -4,6 +4,8 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data.Entities; +using Jellyfin.Data.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; @@ -101,7 +103,7 @@ namespace Emby.Notifications switch (request.SendToUserMode.Value) { case SendToUserType.Admins: - return _userManager.Users.Where(i => i.Policy.IsAdministrator) + return _userManager.Users.Where(i => i.HasPermission(PermissionKind.IsAdministrator)) .Select(i => i.Id); case SendToUserType.All: return _userManager.UsersIds; @@ -117,7 +119,7 @@ namespace Emby.Notifications var config = GetConfiguration(); return _userManager.Users - .Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N", CultureInfo.InvariantCulture), i.Policy)) + .Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N", CultureInfo.InvariantCulture), i)) .Select(i => i.Id); } @@ -142,7 +144,7 @@ namespace Emby.Notifications User = user }; - _logger.LogDebug("Sending notification via {0} to user {1}", service.Name, user.Name); + _logger.LogDebug("Sending notification via {0} to user {1}", service.Name, user.Username); try { |
