aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()