X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommand.java;h=39a6a1e25bbe5e31c6fb7532d8289dfff0bac208;hp=a3f709e93ea16a4aa5a8a4264ef77070eccc7215;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=bfff2701428b3bef78e713d05fcd944eb585168d diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index a3f709e..39a6a1e 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java @@ -1,5 +1,5 @@ /* - * Sone - CreatePostCommand.java - Copyright © 2011–2016 David Roden + * Sone - CreatePostCommand.java - Copyright © 2011–2020 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 @@ -29,8 +29,7 @@ import freenet.support.SimpleFieldSet; /** * FCP command that creates a new {@link Post}. * - * @see Core#createPost(Sone, Optional, String) - * @author David ‘Bombe’ Roden + * @see Core#createPost(Sone, Sone, String) */ public class CreatePostCommand extends AbstractSoneCommand { @@ -58,7 +57,7 @@ public class CreatePostCommand extends AbstractSoneCommand { if (sone.equals(recipient)) { return new ErrorResponse("Sone and Recipient must not be the same."); } - Post post = getCore().createPost(sone, Optional.fromNullable(recipient), text); + Post post = getCore().createPost(sone, recipient, text); return new Response("PostCreated", new SimpleFieldSetBuilder().put("Post", post.getId()).get()); }