aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorKhaksar Weqar <wkhaksar1@gmail.com>2021-11-05 09:04:44 +0100
committerKhaksar Weqar <wkhaksar1@gmail.com>2021-11-05 09:04:44 +0100
commitc370aa660d216980a0c8f52ca856b4116ff5ca23 (patch)
treea1cb0654ae02dcee58f5fda8c524604163b00fcb /src/main/java
parent7d5a18e6fd2b798873a719b361c9a7a61a236d6b (diff)
downloadtrackermap-server-c370aa660d216980a0c8f52ca856b4116ff5ca23.tar.gz
trackermap-server-c370aa660d216980a0c8f52ca856b4116ff5ca23.tar.bz2
trackermap-server-c370aa660d216980a0c8f52ca856b4116ff5ca23.zip
resolved-gradle-check-errors
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/resource/PasswordResource.java3
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorFirebase.java2
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorMail.java2
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorPushover.java4
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorSms.java4
5 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/api/resource/PasswordResource.java b/src/main/java/org/traccar/api/resource/PasswordResource.java
index 79d675434..1868a6191 100644
--- a/src/main/java/org/traccar/api/resource/PasswordResource.java
+++ b/src/main/java/org/traccar/api/resource/PasswordResource.java
@@ -53,7 +53,8 @@ public class PasswordResource extends BaseResource {
Context.getUsersManager().updateItem(user);
VelocityContext velocityContext = TextTemplateFormatter.prepareContext(null);
velocityContext.put("token", token);
- NotificationMessage fullMessage = TextTemplateFormatter.formatMessage(velocityContext, "passwordReset", "full");
+ NotificationMessage fullMessage =
+ TextTemplateFormatter.formatMessage(velocityContext, "passwordReset", "full");
Context.getMailManager().sendMessage(userId, fullMessage.getSubject(), fullMessage.getBody());
break;
}
diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
index b452205f6..f91ec25a0 100644
--- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java
+++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
@@ -69,7 +69,7 @@ public class NotificatorFirebase extends Notificator {
final User user = Context.getPermissionsManager().getUser(userId);
if (user.getAttributes().containsKey("notificationTokens")) {
- NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position,"short");
+ NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position, "short");
Notification notification = new Notification();
notification.title = shortMessage.getSubject();
diff --git a/src/main/java/org/traccar/notificators/NotificatorMail.java b/src/main/java/org/traccar/notificators/NotificatorMail.java
index 48e9d2311..9b5637ed8 100644
--- a/src/main/java/org/traccar/notificators/NotificatorMail.java
+++ b/src/main/java/org/traccar/notificators/NotificatorMail.java
@@ -30,7 +30,7 @@ public final class NotificatorMail extends Notificator {
@Override
public void sendSync(long userId, Event event, Position position) throws MessageException {
try {
- NotificationMessage fullMessage = NotificationFormatter.formatMessage(userId, event, position,"full");
+ NotificationMessage fullMessage = NotificationFormatter.formatMessage(userId, event, position, "full");
Context.getMailManager().sendMessage(userId, fullMessage.getSubject(), fullMessage.getBody());
} catch (MessagingException e) {
throw new MessageException(e);
diff --git a/src/main/java/org/traccar/notificators/NotificatorPushover.java b/src/main/java/org/traccar/notificators/NotificatorPushover.java
index b62be7654..456c2fe4f 100644
--- a/src/main/java/org/traccar/notificators/NotificatorPushover.java
+++ b/src/main/java/org/traccar/notificators/NotificatorPushover.java
@@ -77,13 +77,13 @@ public class NotificatorPushover extends Notificator {
return;
}
- NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position,"short");
+ NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position, "short");
Message message = new Message();
message.token = token;
message.user = this.user;
message.device = device;
- message.title= shortMessage.getSubject();
+ message.title = shortMessage.getSubject();
message.message = shortMessage.getBody();
Context.getClient().target(url).request()
diff --git a/src/main/java/org/traccar/notificators/NotificatorSms.java b/src/main/java/org/traccar/notificators/NotificatorSms.java
index c99b555ce..fb817b112 100644
--- a/src/main/java/org/traccar/notificators/NotificatorSms.java
+++ b/src/main/java/org/traccar/notificators/NotificatorSms.java
@@ -32,7 +32,7 @@ public final class NotificatorSms extends Notificator {
public void sendAsync(long userId, Event event, Position position) {
final User user = Context.getPermissionsManager().getUser(userId);
if (user.getPhone() != null) {
- NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position,"short");
+ NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position, "short");
Main.getInjector().getInstance(StatisticsManager.class).registerSms();
Context.getSmsManager().sendMessageAsync(user.getPhone(),
shortMessage.getBody(), false);
@@ -43,7 +43,7 @@ public final class NotificatorSms extends Notificator {
public void sendSync(long userId, Event event, Position position) throws MessageException, InterruptedException {
final User user = Context.getPermissionsManager().getUser(userId);
if (user.getPhone() != null) {
- NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position,"short");
+ NotificationMessage shortMessage = NotificationFormatter.formatMessage(userId, event, position, "short");
Main.getInjector().getInstance(StatisticsManager.class).registerSms();
Context.getSmsManager().sendMessageSync(user.getPhone(),
shortMessage.getBody(), false);