super(core, true);
}
- /**
- * {@inheritDoc}
- */
@Override
public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
- Sone sone = getSone(parameters, "Sone", true);
+ Sone sone = getMandatoryLocalSone(parameters, "Sone");
Post post = getPost(parameters, "Post");
String text = getString(parameters, "Text");
- PostReply reply = getCore().createReply(sone, post, text);
+ PostReply reply = sone.newPostReplyBuilder(post.getId()).withText(text).build(getCore().postReplyCreated());
return new Response("ReplyCreated", new SimpleFieldSetBuilder().put("Reply", reply.getId()).get());
}