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 4fcf9640478ea9a3fd439c3663d40a26df46b41c 69 lines 1.9 kB view raw
1meta { 2 name: Unlock Topic 3 type: http 4 seq: 4 5} 6 7delete { 8 url: {{appview_url}}/api/mod/lock/123456 9} 10 11headers { 12 Content-Type: application/json 13} 14 15body:json { 16 { 17 "reason": "Discussion can continue constructively" 18 } 19} 20 21assert { 22 res.status: eq 200 23 res.body.success: eq true 24 res.body.action: eq space.atbb.modAction.unlock 25} 26 27docs { 28 Unlocks a previously locked topic (reversal moderation action). 29 30 Requires authentication via session cookie and `space.atbb.permission.lockTopics` permission. 31 32 Path parameters: 33 - topicId: string (required) - Database ID of the topic post to unlock (in URL path) 34 35 Body parameters: 36 - reason: string (required) - Reason for unlocking (1-3000 characters, cannot be empty) 37 38 Returns: 39 { 40 "success": true, 41 "action": "space.atbb.modAction.unlock", 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 topic is already unlocked, returns 200 with `alreadyActive: true` (idempotent). 50 51 Writes a modAction record to the Forum DID's PDS with: 52 - action: "space.atbb.modAction.unlock" 53 - subject: { post: { uri, cid } } 54 - reason: provided reason 55 - createdBy: moderator's DID 56 57 Error codes: 58 - 400: Invalid input (invalid topicId format, missing/empty reason, malformed JSON) 59 - 401: Unauthorized (not authenticated) 60 - 403: Forbidden (lacks lockTopics 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 - Unlock writes a distinct "unlock" action type (different from lock) 67 - Read-path logic determines current lock state by checking most recent action chronologically 68 - Additive reversal model: unlock writes new record, doesn't delete lock record 69}