Use user url in mention if we have it.
This commit is contained in:
parent
b3b7ab5d9a
commit
806550c921
2 changed files with 11 additions and 3 deletions
|
|
@ -189,7 +189,9 @@ defmodule Pleroma.Formatter do
|
|||
|
||||
subs =
|
||||
subs ++
|
||||
Enum.map(mentions, fn {match, %User{ap_id: ap_id}, uuid} ->
|
||||
Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} ->
|
||||
ap_id = info["source_data"]["url"] || ap_id
|
||||
|
||||
short_match = String.split(match, "@") |> tl() |> hd()
|
||||
{uuid, "<span><a href='#{ap_id}'>@<span>#{short_match}</span></a></span>"}
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue