Skip to content

Commit

Permalink
fix: clean up sendNotifications function
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianaCeric committed Dec 20, 2023
1 parent b694be2 commit fb8c783
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,7 @@ private void sendNotifications() {
Map<String, Object> templateData = Map.of(
"tripId", trip.id,
"tripName", trip.tripName,
"notifications", new ArrayList<>(notifications).stream()
// Make certain notifications, such as the initial reminder one, appear on top.
.sorted(Comparator.comparingInt(TripMonitorNotification::sortOrder))
.map(notification -> Map.of(
"type", notification.type.toString(),
"body", notification.body
))
.collect(Collectors.toList())
"notifications", new ArrayList<>(notifications)
);
// FIXME: Change log level
LOG.info("Sending notification to user {}", trip.userId);
Expand Down

0 comments on commit fb8c783

Please sign in to comment.