aboutsummaryrefslogtreecommitdiff
path: root/routes/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'routes/post.go')
-rw-r--r--routes/post.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routes/post.go b/routes/post.go
index 016e533..64df600 100644
--- a/routes/post.go
+++ b/routes/post.go
@@ -17,6 +17,12 @@ func PostGet(ctx *fiber.Ctx) error {
return err
}
+ // this is a activitpub json request return json instead of html page
+ if activitypub.AcceptActivity(ctx.Get("Accept")) {
+ activitypub.GetActorPost(ctx, ctx.Path())
+ return nil
+ }
+
postId := ctx.Params("post")
inReplyTo := actor.Id + "/" + postId