Changeset d8e3ff7 in Klonkt for src/routes/circle.js
- Timestamp:
- 06/30/2026 01:38:13 PM (2 months ago)
- Branches:
- main
- Children:
- 5924bbf
- Parents:
- 8b700ad
- File:
-
- 1 edited
-
src/routes/circle.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/circle.js
r8b700ad rd8e3ff7 31 31 if (!site || !apEnabled() || (ActivityPubService.autoBoostCount(site.slug) === 0 && ActivityPubService.boostedCount(site.slug) === 0)) return next(); 32 32 33 const members = ActivityPubService.getCirkelMembers(site.slug); 34 // Optional ?actor=<uri> → show only that member's posts. Only honour a uri that is 35 // actually a featured member (so it can't be used to probe arbitrary timeline rows). 36 const reqActor = safeUrl(req.query.actor); 37 const activeMember = reqActor ? members.find((m) => m.actor_uri === reqActor) : null; 38 const activeActor = activeMember ? activeMember.actor_uri : null; 39 40 const posts = ActivityPubService.getCirkelPosts(site.slug, 80, activeActor).map((r) => { 33 const posts = ActivityPubService.getCirkelPosts(site.slug, 80).map((r) => { 41 34 const text = htmlToText(r.content); 42 35 // Show ONLY the title (the bold first line a Klonkt note carries), not the whole … … 68 61 }); 69 62 70 const sites = members.map((s) => ({ 71 name: s.name || 'Onbekend', url: safeUrl(s.url), avatar: safeUrl(s.icon), 72 actor_uri: s.actor_uri, active: !!(activeActor && s.actor_uri === activeActor), 73 })); 63 const sites = ActivityPubService.getCirkelMembers(site.slug) 64 .map((s) => ({ name: s.name || 'Onbekend', url: safeUrl(s.url), avatar: safeUrl(s.icon) })); 74 65 75 renderPage(req, res, 'pages/circle-feed', { 76 pageTitle: 'Cirkel', bodyClass: 'on-cirkel', posts, sites, 77 activeActor, activeName: activeMember ? (activeMember.name || '') : '', 78 }); 66 renderPage(req, res, 'pages/circle-feed', { pageTitle: 'Cirkel', bodyClass: 'on-cirkel', posts, sites }); 79 67 }); 80 68
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)