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=b139ba258d28167b3d272b4919ed4290ea672162;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=914d5522692e7714ba5bdefb002fedc8e293f5fc diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index b139ba2..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 @@ -30,7 +30,6 @@ import freenet.support.SimpleFieldSet; * FCP command that creates a new {@link Post}. * * @see Core#createPost(Sone, Sone, String) - * @author David ‘Bombe’ Roden */ 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()); }