CommonAPI: Linkify chat messages.

This commit is contained in:
lain 2020-05-30 12:30:31 +02:00
commit 8bdf18d7c1
2 changed files with 29 additions and 1 deletions

View file

@ -50,7 +50,12 @@ defmodule Pleroma.Web.CommonAPI do
defp format_chat_content(nil), do: nil
defp format_chat_content(content) do
content |> Formatter.html_escape("text/plain")
{text, _, _} =
content
|> Formatter.html_escape("text/plain")
|> Formatter.linkify()
text
end
defp validate_chat_content_length(_, true), do: :ok