Fix timelines in subway tooter.

This commit is contained in:
Lain Iwakura 2017-12-19 16:15:07 +01:00
commit f1f79c0dca
3 changed files with 7 additions and 2 deletions

View file

@ -10,7 +10,7 @@ defmodule Pleroma.Formatter do
def parse_tags(text, data \\ %{}) do
Regex.scan(@tag_regex, text)
|> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, String.downcase(tag)} end)
|> (fn map -> if data["sensitive"] in [true, "True", "true"], do: [{"#nsfw", "nsfw"}] ++ map, else: map end).()
|> (fn map -> if data["sensitive"] in [true, "True", "true", "1"], do: [{"#nsfw", "nsfw"}] ++ map, else: map end).()
end
def parse_mentions(text) do