diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-10-17 19:15:20 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-10-17 19:15:20 +0000 |
commit | 582dbe5c8dceafdbcb266aeb43279456818e773a (patch) | |
tree | 02e0efa857e694e53e5da2adac7c80d01d989354 /lib/pleroma/formatter.ex | |
parent | c7140c67c7eed28222a4351c1132b44faf1f7ce7 (diff) | |
download | pleroma-582dbe5c8dceafdbcb266aeb43279456818e773a.tar.gz |
formatter: fix matching osada users
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r-- | lib/pleroma/formatter.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 5b63fb795..21b08a62e 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -248,7 +248,12 @@ defmodule Pleroma.Formatter do subs = subs ++ 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() |