Rename post and reply implementations; use builder to create replies.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / CreateReplyCommand.java
index 9fc78d6..2de9bef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - CreateReplyCommand.java - Copyright © 2011 David Roden
+ * Sone - CreateReplyCommand.java - Copyright © 2011–2013 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
@@ -53,7 +53,7 @@ public class CreateReplyCommand extends AbstractSoneCommand {
                Sone sone = getSone(parameters, "Sone", true);
                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());
        }