diff --git a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs index a5929a393f..7c82561785 100644 --- a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs @@ -21,8 +21,11 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification< { } - /// - /// Gets a enumeration of with the published entities. + public ContentPublishedNotification(IEnumerable target, EventMessages messages, bool includeDescendants) + : base(target, messages) => IncludeDescendants = includeDescendants; + /// public IEnumerable PublishedEntities => Target; + + public bool IncludeDescendants { get; set; } } diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index c32a1a4183..c67b959826 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -2164,7 +2164,7 @@ public class ContentService : RepositoryService, IContentService // (SaveAndPublishBranchOne does *not* do it) scope.Notifications.Publish( new ContentTreeChangeNotification(document, TreeChangeTypes.RefreshBranch, eventMessages)); - scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages)); + scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages, true)); scope.Complete(); }