aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/resource
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-05 09:34:01 -0700
committerGitHub <noreply@github.com>2021-11-05 09:34:01 -0700
commitfb26fa078fc3299112108a682004f41e767d397b (patch)
treeef6d4bc4fa9f2b883dc7fc6512476281a0d1e45e /src/main/java/org/traccar/api/resource
parent54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef (diff)
parentc370aa660d216980a0c8f52ca856b4116ff5ca23 (diff)
downloadtrackermap-server-fb26fa078fc3299112108a682004f41e767d397b.tar.gz
trackermap-server-fb26fa078fc3299112108a682004f41e767d397b.tar.bz2
trackermap-server-fb26fa078fc3299112108a682004f41e767d397b.zip
Merge pull request #4763 from wkhaksar/push-notifications-title
Title for push notifications
Diffstat (limited to 'src/main/java/org/traccar/api/resource')
-rw-r--r--src/main/java/org/traccar/api/resource/PasswordResource.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/resource/PasswordResource.java b/src/main/java/org/traccar/api/resource/PasswordResource.java
index 20e8d768d..1868a6191 100644
--- a/src/main/java/org/traccar/api/resource/PasswordResource.java
+++ b/src/main/java/org/traccar/api/resource/PasswordResource.java
@@ -19,7 +19,7 @@ import org.apache.velocity.VelocityContext;
import org.traccar.Context;
import org.traccar.api.BaseResource;
import org.traccar.model.User;
-import org.traccar.notification.FullMessage;
+import org.traccar.notification.NotificationMessage;
import org.traccar.notification.TextTemplateFormatter;
import javax.annotation.security.PermitAll;
@@ -53,8 +53,9 @@ public class PasswordResource extends BaseResource {
Context.getUsersManager().updateItem(user);
VelocityContext velocityContext = TextTemplateFormatter.prepareContext(null);
velocityContext.put("token", token);
- FullMessage message = TextTemplateFormatter.formatFullMessage(velocityContext, "passwordReset");
- Context.getMailManager().sendMessage(userId, message.getSubject(), message.getBody());
+ NotificationMessage fullMessage =
+ TextTemplateFormatter.formatMessage(velocityContext, "passwordReset", "full");
+ Context.getMailManager().sendMessage(userId, fullMessage.getSubject(), fullMessage.getBody());
break;
}
}