Changeset 8b07c12 in Klonkt for src/routes/activitypub.js
- Timestamp:
- 07/22/2026 12:26:08 AM (7 weeks ago)
- Branches:
- main
- Children:
- dc4aa08
- Parents:
- 4c70ecb
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r4c70ecb r8b07c12 87 87 ).all(site.id); 88 88 AP.sendAP(res, AP.buildOutbox(baseUrl(req), site, posts)); 89 }); 90 91 // ── Blocked collection (owner only, AP §5.6) ────────────────────── 92 // The server blocklist is the source of truth for Shaer's "in Orbit": 93 // clients read it here instead of keeping their own state. Actor-kind 94 // blocks only (domain blocks are instance policy, not an Orbit member). 95 router.get('/ap/users/:slug/blocked', (req, res) => { 96 const auth = OAuth.verifyBearer(req.headers.authorization); 97 if (!auth || auth.site.slug !== req.params.slug) return res.status(403).end(); 98 const base = baseUrl(req); 99 const items = AP.listBlocks(auth.site.slug) 100 .filter((b) => b.kind === 'actor') 101 .map((b) => b.target); 102 AP.sendAP(res, { 103 '@context': AP.AP_CONTEXT, 104 id: `${base}/ap/users/${auth.site.slug}/blocked`, 105 type: 'OrderedCollection', 106 totalItems: items.length, 107 orderedItems: items, 108 }); 89 109 }); 90 110
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)