aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-10-17 19:15:20 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-10-17 19:15:20 +0000
commit582dbe5c8dceafdbcb266aeb43279456818e773a (patch)
tree02e0efa857e694e53e5da2adac7c80d01d989354 /lib/pleroma/formatter.ex
parentc7140c67c7eed28222a4351c1132b44faf1f7ce7 (diff)
downloadpleroma-582dbe5c8dceafdbcb266aeb43279456818e773a.tar.gz
formatter: fix matching osada users
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex7
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()