From 67ff8d9311d453220af1b84385281a077a3cb20e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 19 Mar 2019 18:23:06 +0000 Subject: [PATCH] user: properly cope with actors which do not declare a followers collection --- lib/pleroma/user.ex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index fb3bd121d..8df276ae0 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -104,9 +104,8 @@ defmodule Pleroma.User do "#{Web.base_url()}/users/#{nickname}" end - def ap_followers(%User{} = user) do - "#{ap_id(user)}/followers" - end + def ap_followers(%User{follower_address: fa}) when is_binary(fa), do: fa + def ap_followers(%User{} = user), do: "#{ap_id(user)}/followers" def user_info(%User{} = user) do oneself = if user.local, do: 1, else: 0 -- 2.45.2