🔀 Merge “release/v81” into “master”
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / GetSoneCommand.java
index e3ec1b1..64d24fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - GetSoneCommand.java - Copyright © 2011–2013 David Roden
+ * Sone - GetSoneCommand.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,6 +17,8 @@
 
 package net.pterodactylus.sone.fcp;
 
+import static net.pterodactylus.sone.fcp.AbstractSoneCommandKt.encodeSone;
+
 import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Sone;
@@ -25,13 +27,10 @@ import net.pterodactylus.sone.freenet.fcp.FcpException;
 import com.google.common.base.Optional;
 
 import freenet.support.SimpleFieldSet;
-import freenet.support.api.Bucket;
 
 /**
  * Implements the “GetSone“ FCP command which returns {@link Profile}
  * information about a {@link Sone}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 public class GetSoneCommand extends AbstractSoneCommand {
 
@@ -49,10 +48,10 @@ public class GetSoneCommand extends AbstractSoneCommand {
         * {@inheritDoc}
         */
        @Override
-       public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
+       public Response execute(SimpleFieldSet parameters) throws FcpException {
                Sone sone = getSone(parameters, "Sone", false);
-               Optional<Sone> localSone = getSone(parameters, "LocalSone", false, false);
-               return new Response("Sone", encodeSone(sone, "", localSone));
+               Optional<Sone> localSone = getSone(parameters, "LocalSone", true, false);
+               return new Response("Sone", encodeSone(sone, "Sone.", localSone));
        }
 
 }