X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommand.java;h=3cb1d6bae12190224c7e65e7c10925921c1c00b8;hp=2c8456de57394a92966022da4acd558f62c61a91;hb=HEAD;hpb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052 diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index 2c8456d..3cb1d6b 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–2019 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 @@ -17,8 +17,6 @@ package net.pterodactylus.sone.fcp; -import com.google.common.base.Optional; - import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; @@ -29,7 +27,7 @@ import freenet.support.SimpleFieldSet; /** * FCP command that creates a new {@link Post}. * - * @see Core#createPost(Sone, Optional, String) + * @see Core#createPost(Sone, Sone, String) */ public class CreatePostCommand extends AbstractSoneCommand { @@ -57,7 +55,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()); }