mirror of
https://github.com/Sheldan/Sissi.git
synced 2026-01-03 16:27:48 +00:00
[SIS-3] adding separator for the meetup members
adding member counter to message display only notify member with yes/maybe decision of meetup cancellation
This commit is contained in:
@@ -147,12 +147,18 @@ public class MeetupServiceBean {
|
||||
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, serverId);
|
||||
MeetupMessageModel model = getMeetupMessageModel(meetup);
|
||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(MEETUP_CANCELLATION_TEMPLATE, model);
|
||||
meetup.getParticipants().forEach(meetupParticipator -> {
|
||||
Long userId = meetupParticipator.getParticipator().getUserReference().getId();
|
||||
userService.retrieveUserForId(userId)
|
||||
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
|
||||
.thenAccept(message -> log.info("Notified user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId));
|
||||
});
|
||||
meetup
|
||||
.getParticipants()
|
||||
.stream()
|
||||
.filter(meetupParticipator ->
|
||||
meetupParticipator.getDecision().equals(MeetupDecision.MAYBE) ||
|
||||
meetupParticipator.getDecision().equals(MeetupDecision.YES))
|
||||
.forEach(meetupParticipator -> {
|
||||
Long userId = meetupParticipator.getParticipator().getUserReference().getId();
|
||||
userService.retrieveUserForId(userId)
|
||||
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
|
||||
.thenAccept(message -> log.info("Notified user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId));
|
||||
});
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@@ -209,11 +215,11 @@ public class MeetupServiceBean {
|
||||
meetupParticipator.getDecision().equals(MeetupDecision.MAYBE) ||
|
||||
meetupParticipator.getDecision().equals(MeetupDecision.YES))
|
||||
.forEach(meetupParticipator -> {
|
||||
Long userId = meetupParticipator.getParticipator().getUserReference().getId();
|
||||
userService.retrieveUserForId(userId)
|
||||
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
|
||||
.thenAccept(message -> log.info("Notified user {} about incoming meetup {} in server {}.", userId, meetupId, serverId));
|
||||
});
|
||||
Long userId = meetupParticipator.getParticipator().getUserReference().getId();
|
||||
userService.retrieveUserForId(userId)
|
||||
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
|
||||
.thenAccept(message -> log.info("Notified user {} about incoming meetup {} in server {}.", userId, meetupId, serverId));
|
||||
});
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
Reference in New Issue
Block a user