From 25829d2d0e379c323b8f2ae6e7c2aad7548f0a30 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 18 Jun 2022 13:57:30 -0700 Subject: sticky and lock implemented --- route/util.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'route/util.go') 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") -- cgit v1.2.3