From 0a318777ad611e5b0080807e19d5030bbe5e8431 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Tue, 26 Jul 2022 18:29:44 -0300 Subject: fix fail with posting to a down instance's thread in a couple of scenarios, fchannel may fail to contact a server and due to faulty error handling, activities that are supposed to send never do. this commit corrects said error handling. --- activitypub/activity.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activitypub/activity.go') diff --git a/activitypub/activity.go b/activitypub/activity.go index bd57778..b05de07 100644 --- a/activitypub/activity.go +++ b/activitypub/activity.go @@ -41,7 +41,11 @@ func (activity Activity) AddFollowersTo() (Activity, error) { reqActivity := Activity{Id: e + "/followers"} aFollowers, err := reqActivity.GetCollection() if err != nil { - return activity, util.MakeError(err, "AddFollowersTo") + // Safely fail so we can continue to federate + config.Log.Printf("failed to get collection from %s: %v", reqActivity.Id, err) + continue + + // return activity, util.MakeError(err, "AddFollowersTo") } // get followers of activity actor -- cgit v1.2.3