From 4e400466deca4fcaf699197d8e30b427c36ea1fe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 16 Oct 2017 02:11:09 -0400 Subject: fix library notifications being sent to all users --- Emby.Server.Implementations/Notifications/NotificationManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Notifications/NotificationManager.cs') 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 @@ -37,6 +37,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; @@ -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); -- cgit v1.2.3