Changeset bac4bf3 in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 08/13/2026 11:55:04 AM (4 weeks ago)
- Branches:
- main
- Children:
- 783b9ff
- Parents:
- 7e9d0ea
- git-author:
- Robin <roboburr@…> (08/13/2026 11:54:36 AM)
- git-committer:
- Robin <roboburr@…> (08/13/2026 11:55:04 AM)
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r7e9d0ea rbac4bf3 1032 1032 .sort((a, b) => wanneer(b) - wanneer(a)) 1033 1033 .slice(0, MAX_OUTBOX); 1034 // WAT HIER NOG NIET GEPAGINEERD IS, en dat hoort genoemd (shaer-sk4): deze 1035 // lijst is al door de route op twintig rijen afgekapt, dus pagina 2 is leeg. 1036 // Echt doorbladeren vraagt een LIMIT/OFFSET in SQL -- en dat is hier lastiger 1037 // dan bij volgers, want posts en tracks worden op DATUM door elkaar gevlochten 1038 // en komen uit twee tabellen. Dat vraagt een UNION met een offset erover, geen 1039 // tweede slice. De vorm klopt nu wel: pagina 2 zegt eerlijk dat hij leeg is en 1040 // biedt geen `next` aan, in plaats van pagina 1 nog eens te geven. 1034 1041 // GEPAGINEERD, ook al past alles op een pagina (Funkwhale, 11-8). 1035 1042 // … … 1049 1056 // account owner (a C2S bearer scoped to this site) gets the real actor URIs via 1050 1057 // `items`, so their own client can build a friends list. 1051 export function buildFollowers(base, site, count, items = null ) {1058 export function buildFollowers(base, site, count, items = null, { page = false } = {}) { 1052 1059 const id = `${actorId(base, site.slug)}/followers`; 1053 1060 // count-only for the public; full for the owner 1054 return pagedCollection(id, items || [], { totalItems: items ? items.length : (count || 0) });1061 return pagedCollection(id, items || [], { totalItems: items ? items.length : (count || 0), page }); 1055 1062 } 1056 1063 1057 1064 // The accounts this site follows — count only, mirroring buildFollowers. The spec lists 1058 1065 // `following` as a standard actor property; Hubzilla/Friendica + crawlers expect it. 1059 export function buildFollowing(base, site, count, items = null ) {1066 export function buildFollowing(base, site, count, items = null, { page = false } = {}) { 1060 1067 const id = `${actorId(base, site.slug)}/following`; 1061 1068 // count-only for the public; full for the owner 1062 return pagedCollection(id, items || [], { totalItems: items ? items.length : (count || 0) });1069 return pagedCollection(id, items || [], { totalItems: items ? items.length : (count || 0), page }); 1063 1070 } 1064 1071
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)