[AB-xxx] not always creating a user instance in the experience listener

adding logging in case the warn decay notification fails
This commit is contained in:
Sheldan
2021-08-21 15:50:11 +02:00
parent 19a4858da1
commit 2c31fa1c1e
2 changed files with 13 additions and 11 deletions

View File

@@ -188,7 +188,7 @@ public class WarnServiceBean implements WarnService {
MessageToSend messageToSend = templateService.renderEmbedTemplate(WARN_DECAY_NOTIFICATION_TEMPLATE_KEY, model, serverId);
log.info("Notifying user {} in server {} about decayed warning {}.", userId, serverId, warningId);
notificationFutures.add(messageService.sendMessageToSendToUser(memberToSendTo.getUser(), messageToSend).exceptionally(throwable -> {
log.error("Failed to send warn decay message to user {} in server {} to notify about decay warning {}.", userId, server, warningId);
log.error("Failed to send warn decay message to user {} in server {} to notify about decay warning {}.", userId, server.getId(), warningId, throwable);
return null;
}));
} else {