Changeset 75bda38 in Klonkt for src/routes/activitypub.js
- Timestamp:
- 06/25/2026 06:54:59 AM (3 months ago)
- Branches:
- main
- Children:
- f1e0c1f
- Parents:
- abb34d2
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
rabb34d2 r75bda38 6 6 * GET /ap/users/:slug/outbox OrderedCollection of Create(Note) 7 7 * GET /ap/users/:slug/followers count-only OrderedCollection 8 * GET /ap/users/:slug/featured pinned posts (Mastodon "Featured" tab) 8 9 * GET /ap/notes/:id a single Note 9 10 * POST /ap/users/:slug/inbox, /ap/inbox → 202 (Follow/Accept + signature verify: next step) … … 72 73 }); 73 74 75 // ── Featured (pinned posts → Mastodon "Featured" tab) ───────────── 76 router.get('/ap/users/:slug/featured', (req, res) => { 77 const site = publicSite(req.params.slug); 78 if (!site) return res.status(404).end(); 79 const posts = db.prepare( 80 `SELECT id, slug, title, content, cover_image_url, published_at, created_at 81 FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0) 82 AND pinned IS NOT NULL AND pinned > 0 83 ORDER BY pinned ASC, COALESCE(published_at, created_at) DESC LIMIT 20` 84 ).all(site.id); 85 AP.sendAP(res, AP.buildFeatured(baseUrl(req), site, posts)); 86 }); 87 74 88 // ── Note ────────────────────────────────────────────────────────── 75 89 router.get('/ap/notes/:id', (req, res) => {
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)