aboutsummaryrefslogtreecommitdiff
path: root/route/util.go
diff options
context:
space:
mode:
authorFChannel <>2022-06-18 13:57:30 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit25829d2d0e379c323b8f2ae6e7c2aad7548f0a30 (patch)
treec828eb5bb04ce04141c717c26b637a59b32ab979 /route/util.go
parentf3d1683d6562afb30522afb98fb3a22456473275 (diff)
sticky and lock implemented
Diffstat (limited to 'route/util.go')
-rw-r--r--route/util.go6
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")