WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1meta {
2 name: Hide Post
3 type: http
4 seq: 5
5}
6
7post {
8 url: {{appview_url}}/api/mod/hide
9}
10
11headers {
12 Content-Type: application/json
13}
14
15body:json {
16 {
17 "postId": "123456",
18 "reason": "Spam content"
19 }
20}
21
22assert {
23 res.status: eq 200
24 res.body.success: eq true
25 res.body.action: eq space.atbb.modAction.delete
26}
27
28docs {
29 Hides a post from the forum (soft-delete moderator action).
30
31 Requires authentication via session cookie and `space.atbb.permission.moderatePosts` permission.
32
33 Body parameters:
34 - postId: string (required) - Database ID of the post to hide (must be numeric)
35 - reason: string (required) - Reason for hiding (1-3000 characters, cannot be empty)
36
37 Returns:
38 {
39 "success": true,
40 "action": "space.atbb.modAction.delete",
41 "postId": "123456",
42 "postUri": "at://user-did/space.atbb.post/rkey",
43 "uri": "at://forum-did/space.atbb.modAction/rkey",
44 "cid": "bafyrei...",
45 "alreadyActive": false
46 }
47
48 If post is already hidden, returns 200 with `alreadyActive: true` (idempotent).
49
50 Writes a modAction record to the Forum DID's PDS with:
51 - action: "space.atbb.modAction.delete"
52 - subject: { post: { uri, cid } }
53 - reason: provided reason
54 - createdBy: moderator's DID
55
56 Error codes:
57 - 400: Invalid input (missing/invalid postId, missing/empty reason, malformed JSON)
58 - 401: Unauthorized (not authenticated)
59 - 403: Forbidden (lacks moderatePosts permission)
60 - 404: Post not found
61 - 500: ForumAgent not available (server configuration issue)
62 - 503: ForumAgent not authenticated or unable to reach Forum PDS (retry later)
63
64 Notes:
65 - Works on ANY post (topics or replies, unlike lock which is topics-only)
66 - Uses "space.atbb.modAction.delete" action type; unhide uses "space.atbb.modAction.undelete"
67 - Hides are additive - unhide writes a new reversal action
68 - Read-path logic will filter hidden posts from display
69}