Remove booleans from method signatures, create explicit methods.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / CreatePostCommand.java
index 31308be..8ffba74 100644 (file)
@@ -48,11 +48,11 @@ public class CreatePostCommand extends AbstractSoneCommand {
 
        @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.");