projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Actually delete the reply.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
fcp
/
CreateReplyCommand.java
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java
index
84bedc7
..
4a53238
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/CreateReplyCommand.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - CreateReplyCommand.java - Copyright © 2011–201
2
David Roden
+ * Sone - CreateReplyCommand.java - Copyright © 2011–201
3
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-45,15
+45,12
@@
public class CreateReplyCommand 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"
);
Post post = getPost(parameters, "Post");
String text = getString(parameters, "Text");
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());
}
return new Response("ReplyCreated", new SimpleFieldSetBuilder().put("Reply", reply.getId()).get());
}