Changeset 2af2e69 in Klonkt
- Timestamp:
- 06/25/2026 07:18:05 AM (3 months ago)
- Branches:
- main
- Children:
- f9f3312
- Parents:
- 5085b1d
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r5085b1d r2af2e69 77 77 const site = publicSite(req.params.slug); 78 78 if (!site) return res.status(404).end(); 79 // NB: Mastodon DISPLAYS the featured collection in REVERSE (pins shown 80 // last-processed-first). So we emit it reversed (lowest pin priority first, 81 // rank 1 last) → Mastodon flips it back to pin-rank ascending on the profile. 79 82 const posts = db.prepare( 80 83 `SELECT id, slug, title, content, cover_image_url, published_at, created_at 81 84 FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0) 82 85 AND pinned IS NOT NULL AND pinned > 0 83 ORDER BY pinned ASC, COALESCE(published_at, created_at) DESC LIMIT 20`86 ORDER BY pinned DESC, COALESCE(published_at, created_at) ASC LIMIT 20` 84 87 ).all(site.id); 85 88 AP.sendAP(res, AP.buildFeatured(baseUrl(req), site, posts));
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)