Downcase tags coming in through the TwAPI.
[akkoma] / lib / pleroma / formatter.ex
index 50c4279f64c8a5bb8ee24c6a78528df75e2e17de..a8149b7b36801f55934f1f82e30badd86931b418 100644 (file)
@@ -9,7 +9,7 @@ defmodule Pleroma.Formatter do
   @tag_regex ~r/\#\w+/u
   def parse_tags(text) do
     Regex.scan(@tag_regex, text)
-    |> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, tag} end)
+    |> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, String.downcase(tag)} end)
   end
 
   def parse_mentions(text) do