Changeset e27b8db in Klonkt for src/routes/activitypub.js
- Timestamp:
- 07/29/2026 10:04:36 AM (6 weeks ago)
- Branches:
- main
- Children:
- 329873e
- Parents:
- 88d7c8f
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r88d7c8f re27b8db 154 154 const isWard = (() => { try { return Guardianship.listGuardians(auth.site.slug).length > 0; } catch { return false; } })(); 155 155 const embedsAllowed = Guardianship.externalEmbedsAllowed(auth.site.external_embeds, isWard); 156 // The heavier sibling (5.6): may a third party's PLAYER run inside the app, 157 // and may a link hand the child over to a browser? Both are the guardians' 158 // call, both default to off for a ward, and both need the preview gate open 159 // first: you cannot play, or follow, what you may not see. Served here so 160 // the app knows what it may offer instead of guessing. 161 const playbackAllowed = embedsAllowed 162 && Guardianship.externalPlaybackAllowed(auth.site.external_playback, isWard); 156 163 const items = AP.getTimeline(auth.site.slug, 60).map((t) => ({ 157 164 id: `${t.id}#create`, … … 206 213 // An external (non-fediverse) embed, thumbnail-only and never an iframe. 207 214 // Omitted entirely when the gate is closed (see above). 208 'shaer:embed': embedsAllowed ? AP.timelineEmbed(t.embed_json) : undefined, 215 // Carries shaer:playerUrl only when the playback gate is open too. 216 'shaer:embed': embedsAllowed ? AP.timelineEmbed(t.embed_json, { playback: playbackAllowed }) : undefined, 209 217 }, 210 218 })); … … 213 221 id: `${base}/ap/users/${auth.site.slug}/inbox`, 214 222 type: 'OrderedCollection', 223 // What this account may do with what is in here (FEP-633c 5.6). Owner-only 224 // by construction, and never on the public actor document: it says 225 // something about a child, and only the child and its guardians need it. 226 'shaer:capabilities': { 227 'shaer:externalEmbeds': embedsAllowed, 228 'shaer:externalPlayback': playbackAllowed, 229 // Leaving the app is the same decision as playing inside it: with the 230 // gate shut a link is shown but not followed, so the door is closed too 231 // and not just the picture over it. 232 'shaer:externalLinks': playbackAllowed, 233 }, 215 234 totalItems: items.length, 216 235 orderedItems: items,
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)