X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetStatusAjaxPage.java;h=a358fb1df4fa65b9eed1b0068bdaecfb94c1611b;hb=3ea1ec9e8259fe2808fcaadcf7db2e22fd81ad2b;hp=effbebe9f58ca99722a6aaf64a890c9f55256fad;hpb=2288fe8a74e888e9d6a8b13ccbd322ca006c1cec;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index effbebe..a358fb1 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -95,13 +95,19 @@ public class GetStatusAjaxPage extends JsonPage { jsonPost.put("id", post.getId()); jsonPost.put("sone", post.getSone().getId()); jsonPost.put("recipient", (post.getRecipient() != null) ? post.getRecipient().getId() : null); + jsonPost.put("time", post.getTime()); jsonPosts.add(jsonPost); } /* load new replies. */ Set newReplies = webInterface.getNewReplies(); JsonArray jsonReplies = new JsonArray(); for (Reply reply : newReplies) { - jsonReplies.add(reply.getId()); + JsonObject jsonReply = new JsonObject(); + jsonReply.put("id", reply.getId()); + jsonReply.put("sone", reply.getSone().getId()); + jsonReply.put("post", reply.getPost().getId()); + jsonReply.put("postSone", reply.getPost().getSone().getId()); + jsonReplies.add(jsonReply); } return createSuccessJsonObject().put("sones", jsonSones).put("notifications", jsonNotifications).put("removedNotifications", jsonRemovedNotifications).put("newPosts", jsonPosts).put("newReplies", jsonReplies); }