X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreateReplyCommand.java;h=4a5323864ae8d66a0606dd58a5973f7632f24996;hb=c4eb31ab64627adfdeed2a445d67883371203e99;hp=fe4bee8645ce331e3266d9cbe49264e1d6535e32;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java index fe4bee8..4a53238 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java @@ -45,15 +45,12 @@ public class CreateReplyCommand extends AbstractSoneCommand { 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()); }