Group response declarations together
authorMark Felder <feld@feld.me>
Fri, 4 May 2018 21:59:21 +0000 (21:59 +0000)
committerMark Felder <feld@feld.me>
Fri, 4 May 2018 21:59:21 +0000 (21:59 +0000)
lib/pleroma/gopher/server.ex

index 82e241f21904025ea6c40f51286a5ffad0d0532c..f6abcd4d07f27db8fe1c6d4012881ade5bb89e1c 100644 (file)
@@ -65,12 +65,6 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do
     "#{type}#{name}\t#{selector}\t#{address}\t#{port}\r\n"
   end
 
-  def response("") do
-    info("Welcome to #{Keyword.get(@instance, :name, "Pleroma")}!") <>
-      link("Public Timeline", "/main/public") <>
-      link("Federated Timeline", "/main/all") <> ".\r\n"
-  end
-
   def render_activities(activities) do
     activities
     |> Enum.reverse()
@@ -93,6 +87,12 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do
     |> Enum.join("\r\n")
   end
 
+  def response("") do
+    info("Welcome to #{Keyword.get(@instance, :name, "Pleroma")}!") <>
+      link("Public Timeline", "/main/public") <>
+      link("Federated Timeline", "/main/all") <> ".\r\n"
+  end
+
   def response("/main/public") do
     posts =
       ActivityPub.fetch_public_activities(%{"type" => ["Create"], "local_only" => true})