From c982297d89151da914a98534f8cc3ae070112366 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 28 Nov 2010 21:18:44 +0100 Subject: [PATCH] Return recipient of a post in JSON post. --- src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java index 764c5bf..7c96d56 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java @@ -88,6 +88,7 @@ public class GetPostAjaxPage extends JsonPage { JsonObject jsonPost = new JsonObject(); jsonPost.put("id", post.getId()); jsonPost.put("sone", post.getSone().getId()); + jsonPost.put("recipient", (post.getRecipient() == null) ? null : post.getRecipient().getId()); jsonPost.put("time", post.getTime()); postTemplate.set("post", post); StringWriter stringWriter = new StringWriter(); -- 2.7.4