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
at main 69 lines 1.9 kB view raw
1meta { 2 name: Unhide Post 3 type: http 4 seq: 6 5} 6 7delete { 8 url: {{appview_url}}/api/mod/hide/123456 9} 10 11headers { 12 Content-Type: application/json 13} 14 15body:json { 16 { 17 "reason": "False positive - post is appropriate" 18 } 19} 20 21assert { 22 res.status: eq 200 23 res.body.success: eq true 24 res.body.action: eq space.atbb.modAction.undelete 25} 26 27docs { 28 Unhides a previously hidden post (reversal moderation action). 29 30 Requires authentication via session cookie and `space.atbb.permission.moderatePosts` permission. 31 32 Path parameters: 33 - postId: string (required) - Database ID of the post to unhide (in URL path) 34 35 Body parameters: 36 - reason: string (required) - Reason for unhiding (1-3000 characters, cannot be empty) 37 38 Returns: 39 { 40 "success": true, 41 "action": "space.atbb.modAction.undelete", 42 "postId": "123456", 43 "postUri": "at://user-did/space.atbb.post/rkey", 44 "uri": "at://forum-did/space.atbb.modAction/rkey", 45 "cid": "bafyrei...", 46 "alreadyActive": false 47 } 48 49 If post is already unhidden, returns 200 with `alreadyActive: true` (idempotent). 50 51 Writes a modAction record to the Forum DID's PDS with: 52 - action: "space.atbb.modAction.undelete" 53 - subject: { post: { uri, cid } } 54 - reason: provided reason 55 - createdBy: moderator's DID 56 57 Error codes: 58 - 400: Invalid input (invalid postId format, missing/empty reason, malformed JSON) 59 - 401: Unauthorized (not authenticated) 60 - 403: Forbidden (lacks moderatePosts permission) 61 - 404: Post not found 62 - 500: ForumAgent not available (server configuration issue) 63 - 503: ForumAgent not authenticated or unable to reach Forum PDS (retry later) 64 65 Notes: 66 - Unhide writes a distinct "undelete" action type (different from hide's "delete") 67 - Read-path logic determines current hidden state by checking most recent action chronologically 68 - Additive reversal model: unhide writes new record, doesn't delete hide record 69}