CommonAPI: Linkify chat messages.
This commit is contained in:
parent
2c9465cc51
commit
8bdf18d7c1
2 changed files with 29 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue