/**
* FCP command that creates a new {@link Post}.
*
- * @see Core#createPost(Sone, Optional, String)
+ * @see Core#createPost(Sone, Sone, String)
*/
public class CreatePostCommand extends AbstractSoneCommand {
if (sone.equals(recipient)) {
return new ErrorResponse("Sone and Recipient must not be the same.");
}
- Post post = getCore().createPost(sone, Optional.fromNullable(recipient), text);
+ Post post = getCore().createPost(sone, recipient, text);
return new Response("PostCreated", new SimpleFieldSetBuilder().put("Post", post.getId()).get());
}