diff options
author | FChannel0 <77419041+FChannel0@users.noreply.github.com> | 2022-07-29 14:30:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 14:30:21 +0000 |
commit | 301c160caf31d23ec53754df71c779c552bde891 (patch) | |
tree | b916a6523f5096a423366874e55b44a92d1b036d /post/util.go | |
parent | 3a7664d404bca40cb3234924fa969c0ae133d085 (diff) | |
parent | 0a318777ad611e5b0080807e19d5030bbe5e8431 (diff) |
Fix fail with posting to a down instance's thread
Diffstat (limited to 'post/util.go')
-rw-r--r-- | post/util.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/post/util.go b/post/util.go index 922dd11..bb24c90 100644 --- a/post/util.go +++ b/post/util.go @@ -287,12 +287,10 @@ func ObjectFromForm(ctx *fiber.Ctx, obj activitypub.ObjectBase) (activitypub.Obj if originalPost.Id != "" { if local, _ := activity.IsLocal(); !local { actor, err := activitypub.FingerActor(originalPost.Id) - if err != nil { - return obj, util.MakeError(err, "ObjectFromForm") - } - - if !util.IsInStringArray(obj.To, actor.Id) { - obj.To = append(obj.To, actor.Id) + if err == nil { // Keep things moving if it fails + if !util.IsInStringArray(obj.To, actor.Id) { + obj.To = append(obj.To, actor.Id) + } } } else if err != nil { return obj, util.MakeError(err, "ObjectFromForm") |