From 2a402fb3958fe1775afc69075ba394dde0b112a0 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 4 May 2018 21:59:21 +0000 Subject: [PATCH] Group response declarations together --- lib/pleroma/gopher/server.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pleroma/gopher/server.ex b/lib/pleroma/gopher/server.ex index 82e241f21..f6abcd4d0 100644 --- a/lib/pleroma/gopher/server.ex +++ b/lib/pleroma/gopher/server.ex @@ -65,12 +65,6 @@ def link(name, selector, type \\ 1) 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 @@ def render_activities(activities) 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})