diff options
Diffstat (limited to 'route/util.go')
-rw-r--r-- | route/util.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/route/util.go b/route/util.go index 09c5429..5a7d57c 100644 --- a/route/util.go +++ b/route/util.go @@ -139,6 +139,12 @@ func ParseOutboxRequest(ctx *fiber.Ctx, actor activitypub.Actor) error { nObj.Actor = config.Domain + "/" + actor.Name + if locked, _ := nObj.InReplyTo[0].IsLocked(); locked { + ctx.Response().Header.SetStatusCode(403) + _, err := ctx.Write([]byte("thread is locked")) + return util.MakeError(err, "ParseOutboxRequest") + } + nObj, err = nObj.Write() if err != nil { return util.MakeError(err, "ParseOutboxRequest") |