Populate IncludeDescendants on ContentPublishedNotification when publishing branch (forward port of #20578).

This commit is contained in:
Andy Butland
2025-10-22 13:37:19 +02:00
parent 21bf23b67d
commit c2eea5d6cc
2 changed files with 2 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification<
public ContentPublishedNotification(IEnumerable<IContent> target, EventMessages messages, bool includeDescendants)
: base(target, messages) => IncludeDescendants = includeDescendants;
/// <summary>
/// Gets a enumeration of <see cref="IContent"/> which are being published.
/// </summary>

View File

@@ -2207,7 +2207,7 @@ public class ContentService : RepositoryService, IContentService
variesByCulture ? culturesPublished.IsCollectionEmpty() ? null : culturesPublished : ["*"],
null,
eventMessages));
scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages).WithState(notificationState));
scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages, true).WithState(notificationState));
scope.Complete();
}