Changeset 462a931 in Klonkt for src/routes/circle.js
- Timestamp:
- 06/30/2026 01:31:49 PM (2 months ago)
- Branches:
- main
- Children:
- 8b700ad
- Parents:
- d5aa7c8
- File:
-
- 1 edited
-
src/routes/circle.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/circle.js
rd5aa7c8 r462a931 31 31 if (!site || !apEnabled() || (ActivityPubService.autoBoostCount(site.slug) === 0 && ActivityPubService.boostedCount(site.slug) === 0)) return next(); 32 32 33 const posts = ActivityPubService.getCirkelPosts(site.slug, 80).map((r) => { 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) => { 34 41 const text = htmlToText(r.content); 35 42 // Show ONLY the title (the bold first line a Klonkt note carries), not the whole … … 61 68 }); 62 69 63 const sites = ActivityPubService.getCirkelMembers(site.slug) 64 .map((s) => ({ name: s.name || 'Onbekend', url: safeUrl(s.url), avatar: safeUrl(s.icon) })); 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 })); 65 74 66 renderPage(req, res, 'pages/circle-feed', { pageTitle: 'Cirkel', bodyClass: 'on-cirkel', posts, sites }); 75 renderPage(req, res, 'pages/circle-feed', { 76 pageTitle: 'Cirkel', bodyClass: 'on-cirkel', posts, sites, 77 activeActor, activeName: activeMember ? (activeMember.name || '') : '', 78 }); 67 79 }); 68 80
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)