diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-10-16 14:09:41 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-16 14:09:41 -0400 |
| commit | 315ff8ce27525f1f39a851a1002c2d8d5d269b75 (patch) | |
| tree | c28be46859719c585026435e45640a05f1db8d09 /Emby.Server.Implementations/Notifications/NotificationManager.cs | |
| parent | 69b2890d816c50bcca6e37def9222ce9d6010dc3 (diff) | |
| parent | b4fff161fa80b55c9e1ea63914669b4bcd78e41e (diff) | |
Merge pull request #2959 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Notifications/NotificationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Notifications/NotificationManager.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Notifications/NotificationManager.cs b/Emby.Server.Implementations/Notifications/NotificationManager.cs index f49d5a1d1..5b4c43dd5 100644 --- a/Emby.Server.Implementations/Notifications/NotificationManager.cs +++ b/Emby.Server.Implementations/Notifications/NotificationManager.cs @@ -38,6 +38,11 @@ namespace Emby.Server.Implementations.Notifications public Task SendNotification(NotificationRequest request, CancellationToken cancellationToken) { + return SendNotification(request, null, cancellationToken); + } + + public Task SendNotification(NotificationRequest request, BaseItem relatedItem, CancellationToken cancellationToken) + { var notificationType = request.NotificationType; var options = string.IsNullOrWhiteSpace(notificationType) ? @@ -45,7 +50,9 @@ namespace Emby.Server.Implementations.Notifications GetConfiguration().GetOptions(notificationType); var users = GetUserIds(request, options) - .Select(i => _userManager.GetUserById(i)); + .Select(i => _userManager.GetUserById(i)) + .Where(i => relatedItem == null || relatedItem.IsVisibleStandalone(i)) + .ToArray(); var title = GetTitle(request, options); var description = GetDescription(request, options); |
