From: William Pitcock Date: Wed, 17 Oct 2018 19:15:20 +0000 (+0000) Subject: formatter: fix matching osada users X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=582dbe5c8dceafdbcb266aeb43279456818e773a;p=akkoma formatter: fix matching osada users --- 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()