Skip to content

Commit

Permalink
fix: remove redundent event title from email notifications - EXO-73531
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamdi committed Sep 26, 2024
1 parent a751a7b commit 62896fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,8 @@ protected MessageInfo makeMessage(NotificationContext ctx) {
notification,
timeZone);
MessageInfo messageInfo = new MessageInfo();
long creatorIdentityId = event.getCreatorId();
long modifierIdentityId = event.getModifierId();
if((StringUtils.equals(eventModificationType, AgendaEventModificationType.ADDED.name()) && identityId == creatorIdentityId)
|| (StringUtils.equals(eventModificationType, AgendaEventModificationType.UPDATED.name()) && identityId == modifierIdentityId)){
messageInfo.subject(notification.getValueOwnerParameter(STORED_PARAMETER_EVENT_TITLE));
messageInfo.body(TemplateUtils.processGroovy(templateContext));
} else {
messageInfo = buildMessageSubjectAndBody(templateContext, notification, pushNotificationURL);
}
messageInfo.subject(notification.getValueOwnerParameter(STORED_PARAMETER_EVENT_TITLE));
messageInfo.body(TemplateUtils.processGroovy(templateContext));
addIcsFile(notification, messageInfo, timeZone);
Throwable exception = templateContext.getException();
logException(notification, exception);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ private static final void setLasModifiedTime(NotificationInfo notification, Temp
}

private static final String getEventNotificationCreatorOrModifierUserName(Identity identity) {
String fullName = Arrays.stream(identity.getProfile().getFullName().split(" "))
String fullName = Arrays.stream(identity.getProfile().getFullName().split(" +"))
.map(t -> t.substring(0, 1).toUpperCase() + t.substring(1))
.collect(Collectors.joining(" "));
if(Utils.isExternal(identity.getRemoteId())) {
Expand Down

0 comments on commit 62896fa

Please sign in to comment.