no message

This commit is contained in:
Efstratios Giannopoulos 2024-04-10 18:24:14 +03:00
parent f9c89e4f92
commit 0fa6f4dc83
1 changed files with 4 additions and 2 deletions

View File

@ -244,9 +244,11 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
data.setUserId(user.getUserId());
data.setRole(user.getRole());
this.entityManager.persist(data);
if (!this.userScope.getUserId().equals(user.getUserId())) {
this.sendDescriptionTemplateInvitationEvent(data, NotificationContactType.EMAIL);
this.sendDescriptionTemplateInvitationEvent(data, NotificationContactType.IN_APP);
}
}
updatedCreatedIds.add(data.getUserId());
}
List<UserDescriptionTemplateEntity> toDelete = items.stream().filter(x -> updatedCreatedIds.stream().noneMatch(y -> y.equals(x.getUserId()))).collect(Collectors.toList());