Return recipient of a post in JSON post.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Nov 2010 20:18:44 +0000 (21:18 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Nov 2010 20:18:44 +0000 (21:18 +0100)
src/main/java/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.java

index 764c5bf..7c96d56 100644 (file)
@@ -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();