Skip to content

Commit

Permalink
Changed: Notification text of email service
Browse files Browse the repository at this point in the history
djuarezgf committed Apr 16, 2024
1 parent 13a9d1d commit 9405b1c
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/de/samply/app/ProjectManagerConst.java
Original file line number Diff line number Diff line change
@@ -385,6 +385,6 @@ public class ProjectManagerConst {
public final static String THIS_IS_A_TEST = "This is a test";
public final static String OIDC_EMAIL_CLAIM = "email";
public final static String CUSTOM_PROJECT_CONFIGURATION = "CUSTOM";
//public final static String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded";
public final static String EMAIL_SERVICE = "EMAIL_SERVICE";

}
4 changes: 2 additions & 2 deletions src/main/java/de/samply/email/EmailService.java
Original file line number Diff line number Diff line change
@@ -76,13 +76,13 @@ public void sendEmail(@NotNull String email, Optional<String> project, Optional<
if (messageSubject.isPresent()) {
mailSender.send(createMimeMessage(email, emailFrom, messageSubject.get()));
if (project.isPresent()) {
String details = type.toString();
String details = "Email to " + email + " ("+ role + ") of type " + type.toString();
String message = keyValues.get(ProjectManagerConst.EMAIL_CONTEXT_MESSAGE);
if (message != null) {
details += " : " + message;
}
notificationService.createNotification(project.get(), bridgehead.isPresent() ? bridgehead.get() : null,
email, OperationType.SEND_EMAIL, details, null, null);
ProjectManagerConst.EMAIL_SERVICE, OperationType.SEND_EMAIL, details, null, null);
}
} else {
throw new EmailServiceException("Template not found for " + type.name() + " of role " + role.name());

0 comments on commit 9405b1c

Please sign in to comment.