From 582dbe5c8dceafdbcb266aeb43279456818e773a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 17 Oct 2018 19:15:20 +0000 Subject: [PATCH] formatter: fix matching osada users --- lib/pleroma/formatter.ex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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()