fix announcement owner or follower (#19548)

This commit is contained in:
dechoma 2025-02-13 05:53:13 +01:00 committed by GitHub
parent 48515a4cde
commit 0e7010a154
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -377,12 +377,19 @@ public class SubscriptionUtil {
// TODO: For Announcement, Immediate Consumer needs to be Notified (find information from // TODO: For Announcement, Immediate Consumer needs to be Notified (find information from
// Lineage) // Lineage)
case Announcement -> { case Announcement -> {
receiverUrls.addAll(buildReceivers(action, category, type, event, event.getEntityId())); receiverUrls.addAll(
buildReceivers(
action,
category,
type,
thread.getEntityRef().getType(),
thread.getEntityRef().getId()));
} }
} }
} else { } else {
EntityInterface entityInterface = getEntity(event); EntityInterface entityInterface = getEntity(event);
receiverUrls.addAll(buildReceivers(action, category, type, event, entityInterface.getId())); receiverUrls.addAll(
buildReceivers(action, category, type, event.getEntityType(), entityInterface.getId()));
} }
return receiverUrls; return receiverUrls;
@ -392,12 +399,12 @@ public class SubscriptionUtil {
SubscriptionAction action, SubscriptionAction action,
SubscriptionDestination.SubscriptionCategory category, SubscriptionDestination.SubscriptionCategory category,
SubscriptionDestination.SubscriptionType type, SubscriptionDestination.SubscriptionType type,
ChangeEvent event, String entityType,
UUID id) { UUID id) {
Set<String> result = new HashSet<>(); Set<String> result = new HashSet<>();
result.addAll( result.addAll(
buildReceiversListFromActions( buildReceiversListFromActions(
action, category, type, Entity.getCollectionDAO(), id, event.getEntityType())); action, category, type, Entity.getCollectionDAO(), id, entityType));
return result; return result;
} }