Return recipient of a post in JSON post.
[Sone.git] / 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();