X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommand.java;h=8ffba7446b026fe6f18560dcdda627cd8483154f;hb=7fb49938b9198110c34bcc600c545bfa91acf6f2;hp=fcad23c4bc5a652436c07e5650ae2e243f8fb4b2;hpb=041f2bcb967b6ae170053d2a0a7055f869b894dd;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index fcad23c..8ffba74 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java @@ -46,16 +46,13 @@ public class CreatePostCommand 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"); String text = getString(parameters, "Text"); Sone recipient = null; if (parameters.get("Recipient") != null) { - recipient = getSone(parameters, "Recipient", false); + recipient = getMandatorySone(parameters, "Recipient"); } if (sone.equals(recipient)) { return new ErrorResponse("Sone and Recipient must not be the same.");