🔀 Merge branch 'release/v82'
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / CreatePostCommand.java
index b139ba2..3cb1d6b 100644 (file)
@@ -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
@@ -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;
@@ -30,7 +28,6 @@ import freenet.support.SimpleFieldSet;
  * FCP command that creates a new {@link Post}.
  *
  * @see Core#createPost(Sone, Sone, String)
- * @author <a href="mailto:bombe@pterodactylus.net">David â€˜Bombe’ Roden</a>
  */
 public class CreatePostCommand extends AbstractSoneCommand {
 
@@ -58,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());
        }