diff options
author | kaniini <nenolod@gmail.com> | 2018-10-17 19:33:15 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2018-10-17 19:33:15 +0000 |
commit | 6098070234f7d84a32cc918d709efd07520e0b99 (patch) | |
tree | 78157b0cb4c60fc024f4dbc0041db1d7dd53487f /lib | |
parent | c7140c67c7eed28222a4351c1132b44faf1f7ce7 (diff) | |
parent | 958c5e02e8ba37a5412c46f944e0e8458b125ee8 (diff) | |
download | pleroma-6098070234f7d84a32cc918d709efd07520e0b99.tar.gz |
Merge branch 'bugfix/osada-mention' into 'develop'
fix osada mentions
Closes #324
See merge request pleroma/pleroma!380
Diffstat (limited to 'lib')
-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() |