aboutsummaryrefslogtreecommitdiff
path: root/post/util.go
diff options
context:
space:
mode:
authorFChannel0 <77419041+FChannel0@users.noreply.github.com>2022-07-29 14:30:21 +0000
committerGitHub <noreply@github.com>2022-07-29 14:30:21 +0000
commit301c160caf31d23ec53754df71c779c552bde891 (patch)
treeb916a6523f5096a423366874e55b44a92d1b036d /post/util.go
parent3a7664d404bca40cb3234924fa969c0ae133d085 (diff)
parent0a318777ad611e5b0080807e19d5030bbe5e8431 (diff)
Merge pull request #69 from KushBlazingJudah/masterHEADmaster
Fix fail with posting to a down instance's thread
Diffstat (limited to 'post/util.go')
-rw-r--r--post/util.go10
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")