X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommand.java;h=bc905949bd469832997ddc0699f1c59a709aae57;hb=771e8efcd92c7325423441d57c5a6ed90a835e6f;hp=db2189e2581ea656f525587c677defb112b192ea;hpb=317730570a54d7f95a22a59320ea503b9cad2571;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/CreatePostCommand.java index db2189e..bc90594 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 David Roden + * Sone - CreatePostCommand.java - Copyright © 2011–2012 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 @@ -28,7 +28,7 @@ import freenet.support.api.Bucket; /** * FCP command that creates a new {@link Post}. * - * @see Core#createPost(Sone, Sone, String) + * @see Core#createPost(Sone, Sone, long, String) * @author David ‘Bombe’ Roden */ public class CreatePostCommand extends AbstractSoneCommand { @@ -40,7 +40,7 @@ public class CreatePostCommand extends AbstractSoneCommand { * The Sone core */ public CreatePostCommand(Core core) { - super(core); + super(core, true); } /** @@ -57,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, recipient, text); + Post post = getCore().createPost(sone, recipient, System.currentTimeMillis(), text); return new Response("PostCreated", new SimpleFieldSetBuilder().put("Post", post.getId()).get()); }