Skip to content

Commit

Permalink
resolved-gradle-check-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhaksar committed Nov 5, 2021
1 parent 7d5a18e commit c370aa6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/traccar/api/resource/PasswordResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public Response reset(@FormParam("email") String email) throws SQLException, Mes
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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void sendSync(long userId, Event event, Position position) {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ public void sendSync(long userId, Event event, Position position) {
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()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/traccar/notificators/NotificatorSms.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -43,7 +43,7 @@ public void sendAsync(long userId, Event event, Position position) {
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);
Expand Down

0 comments on commit c370aa6

Please sign in to comment.