Skip to content

Commit

Permalink
feat(TripMonitorNotification): improve trip alert message
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianaCeric committed Nov 28, 2023
1 parent 282223d commit 6646029
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static TripMonitorNotification createInitialReminderNotification(Monitore
TripMonitorNotification notification = new TripMonitorNotification();
notification.type = NotificationType.INITIAL_REMINDER;
// TODO: i18n and add itinerary details.
notification.body = String.format("Reminder for your upcoming trip at %s. We will let you know if anything changes.", trip.tripTime);
notification.body = String.format("Reminder for %s at %s.\nWe will notify you if anything changes.", trip.tripName, trip.tripTime);
return notification;
}

Expand All @@ -119,15 +119,13 @@ private static String bodyFromAlerts(
}
// If there are any unseen alerts, include list of these.
if (unseenAlerts.size() > 0) {
// TODO: Improve message.
body.append("New alerts found! They are:");
body.append("\uD83D\uDD14 New alerts found:\n");
body.append(listFromAlerts(unseenAlerts, false));
}
// If there are any resolved alerts, include list of these.
if (resolvedAlerts.size() > 0) {
if (body.length() > 0) body.append("\n");
// TODO: Improve message.
body.append("Resolved alerts are:");
body.append("Resolved alerts:");
body.append(listFromAlerts(resolvedAlerts, true));
}
return body.toString();
Expand Down

0 comments on commit 6646029

Please sign in to comment.