formatter: fix matching osada users

This commit is contained in:
William Pitcock 2018-10-17 19:15:20 +00:00
parent c7140c67c7
commit 582dbe5c8d

View File

@ -248,7 +248,12 @@ defmodule Pleroma.Formatter do
subs = subs =
subs ++ subs ++
Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} -> Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} ->
ap_id = info["source_data"]["url"] || ap_id ap_id =
if is_binary(info["source_data"]["url"]) do
info["source_data"]["url"]
else
ap_id
end
short_match = String.split(match, "@") |> tl() |> hd() short_match = String.split(match, "@") |> tl() |> hd()