From: David ‘Bombe’ Roden Date: Sun, 28 Nov 2010 20:18:44 +0000 (+0100) Subject: Return recipient of a post in JSON post. X-Git-Tag: 0.3.2-RC1~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c982297d89151da914a98534f8cc3ae070112366;p=Sone.git Return recipient of a post in JSON post. --- 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();