- Post newPost = webInterface.getCore().createPost(sone, recipient, text);
- return createSuccessJsonObject().put("postId", newPost.getId());
+ text = TextFilter.filter(request.getHttpRequest().getHeader("host"), text);
+ Post newPost = webInterface.getCore().createPost(sender, recipient, text);
+ return createSuccessJsonObject().put("postId", newPost.getId()).put("sone", sender.getId()).put("recipient", (newPost.getRecipient() != null) ? newPost.getRecipient().getId() : null);