From 3d86b08e31fdd453fc0180266eab859fbb7713db Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 23 Apr 2019 21:11:34 +0200 Subject: [PATCH] Send delete notifications when content is moved to trash --- src/Umbraco.Web/Strategies/NotificationsHandler.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web/Strategies/NotificationsHandler.cs b/src/Umbraco.Web/Strategies/NotificationsHandler.cs index d65f3c6e26..9a1e4fc959 100644 --- a/src/Umbraco.Web/Strategies/NotificationsHandler.cs +++ b/src/Umbraco.Web/Strategies/NotificationsHandler.cs @@ -59,12 +59,10 @@ namespace Umbraco.Web.Strategies applicationContext.Services.NotificationService.SendNotification(updatedEntities, ActionUpdate.Instance, applicationContext); }; - //Send notifications for the delete action - ContentService.Deleted += (sender, args) => - args.DeletedEntities.ForEach( - content => - applicationContext.Services.NotificationService.SendNotification( - content, ActionDelete.Instance, applicationContext)); + //Send notifications for the delete (send to recycle bin) action + ContentService.Trashed += (sender, args) => applicationContext.Services.NotificationService.SendNotification( + args.MoveInfoCollection.Select(mi => mi.Entity), ActionDelete.Instance, applicationContext + ); //Send notifications for the unpublish action ContentService.UnPublished += (sender, args) =>