Merge branch 'release-0.9.6'
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / CreatePostAjaxPage.java
index 4c278c6..bf82328 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - CreatePostAjaxPage.java - Copyright © 2010–2013 David Roden
+ * Sone - CreatePostAjaxPage.java - Copyright © 2010–2016 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
@@ -22,7 +22,6 @@ import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.text.TextFilter;
 import net.pterodactylus.sone.web.WebInterface;
 import net.pterodactylus.sone.web.page.FreenetRequest;
-import net.pterodactylus.util.json.JsonObject;
 
 import com.google.common.base.Optional;
 
@@ -47,7 +46,7 @@ public class CreatePostAjaxPage extends JsonPage {
         * {@inheritDoc}
         */
        @Override
-       protected JsonObject createJsonObject(FreenetRequest request) {
+       protected JsonReturnObject createJsonObject(FreenetRequest request) {
                Sone sone = getCurrentSone(request.getToadletContext());
                if (sone == null) {
                        return createErrorJsonObject("auth-required");
@@ -55,7 +54,7 @@ public class CreatePostAjaxPage extends JsonPage {
                String recipientId = request.getHttpRequest().getParam("recipient");
                Optional<Sone> recipient = webInterface.getCore().getSone(recipientId);
                String senderId = request.getHttpRequest().getParam("sender");
-               Sone sender = webInterface.getCore().getLocalSone(senderId, false);
+               Sone sender = webInterface.getCore().getLocalSone(senderId);
                if (sender == null) {
                        sender = sone;
                }