Skip to content

Commit

Permalink
add timestamp to notification JSON IQSS#7492 IQSS#8487
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed May 18, 2022
1 parent 2b8cb0d commit 230c22b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/UserNotification.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public String getSendDate() {
return new SimpleDateFormat("MMMM d, yyyy h:mm a z").format(sendDate);
}

public Timestamp getSendDateTimestamp() {
return sendDate;
}

public void setSendDate(Timestamp sendDate) {
this.sendDate = sendDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public Response getAllNotificationsForUser() {
notificationObjectBuilder.add("subjectText", subjectText);
notificationObjectBuilder.add("messageText", messageText);
}
notificationObjectBuilder.add("sentTimestamp", notification.getSendDateTimestamp());
jsonArrayBuilder.add(notificationObjectBuilder);
}
JsonObjectBuilder result = Json.createObjectBuilder().add("notifications", jsonArrayBuilder);
Expand Down

0 comments on commit 230c22b

Please sign in to comment.