From 9f45e33ae8ccfdb971caa2fcdb55cffff4e9cc0b Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 31 Mar 2018 21:00:23 +0200 Subject: [PATCH] Proper info. --- lib/pleroma/gopher/server.ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/gopher/server.ex b/lib/pleroma/gopher/server.ex index 6a72e8dd0..f72a0a472 100644 --- a/lib/pleroma/gopher/server.ex +++ b/lib/pleroma/gopher/server.ex @@ -50,8 +50,13 @@ def init(ref, socket, transport, _Opts = []) do end def info(text) do - text = String.replace(text, ~r/[\t\r\n]/, " ") - "#{text}\tfake\(NULL)\t0\r\n" + text = String.replace(text, ~r/[\t\n]/, " ") + String.split(text, "\r") + |> Enum.map(fn (text) -> + "i#{text}\tfake\(NULL)\t0\r\n" + |> IO.inspect() + end) + |> Enum.join("") end def link(name, selector, type \\ 1) do