projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unit test for IdentityAccessor.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
fcp
/
CreatePostCommand.java
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
(file)
--- 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);
}
super(core, true);
}
- /**
- * {@inheritDoc}
- */
@Override
public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
@Override
public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
- Sone sone = get
Sone(parameters, "Sone", true
);
+ Sone sone = get
MandatoryLocalSone(parameters, "Sone"
);
String text = getString(parameters, "Text");
Sone recipient = null;
if (parameters.get("Recipient") != null) {
String text = getString(parameters, "Text");
Sone recipient = null;
if (parameters.get("Recipient") != null) {
- recipient = get
Sone(parameters, "Recipient", false
);
+ recipient = get
MandatorySone(parameters, "Recipient"
);
}
if (sone.equals(recipient)) {
return new ErrorResponse("Sone and Recipient must not be the same.");
}
if (sone.equals(recipient)) {
return new ErrorResponse("Sone and Recipient must not be the same.");