send annotation notification only for visible comments

This commit is contained in:
amentis 2024-06-14 12:41:40 +03:00
parent 523ac1df8b
commit 916c05d6e5
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import gr.cite.annotation.authorization.AuthorizationFlags;
import gr.cite.annotation.authorization.OwnedResource;
import gr.cite.annotation.authorization.Permission;
import gr.cite.annotation.authorization.authorizationcontentresolver.AuthorizationContentResolver;
import gr.cite.annotation.common.enums.AnnotationProtectionType;
import gr.cite.annotation.common.enums.IsActive;
import gr.cite.annotation.common.scope.user.UserScope;
import gr.cite.annotation.data.AnnotationEntity;
@ -95,7 +96,7 @@ public class AnnotationServiceImpl implements AnnotationService {
this.entityManager.flush();
this.sendAnnotationCreatedEvent(data);
if (data.getProtectionType().equals(AnnotationProtectionType.EntityAccessors)) this.sendAnnotationCreatedEvent(data);
return this.builderFactory.builder(AnnotationBuilder.class).authorize(EnumSet.of(AuthorizationFlags.None)).build(BaseFieldSet.build(fields, Annotation._id), data);
}