Changeset af5b79b in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 07/25/2026 08:37:24 AM (7 weeks ago)
- Branches:
- main
- Children:
- 2b4252c
- Parents:
- 8f520e0
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r8f520e0 raf5b79b 278 278 ...Guardianship.helpRequestProps(post), 279 279 ...Guardianship.waveProps(post), 280 // FEP-633c §2.2: object hint that the author is a ward. 281 ...Guardianship.hasGuardiansProps(site.slug), 280 282 tag: [ 281 283 ...mentionTags(post.content), … … 312 314 tag: [...hashtagTags(base, post.content)], 313 315 replies: `${id}/replies`, 316 ...Guardianship.hasGuardiansProps(site.slug), 314 317 }; 315 318 } … … 488 491 sensitive: !!post.nsfw, 489 492 }; 493 // FEP-633c §2.2: object hint that the author is a ward (safely ignorable). 494 Object.assign(note, Guardianship.hasGuardiansProps(site.slug)); 490 495 if (post.nsfw) note.summary = post.content_warning || 'Gevoelige inhoud'; 491 496 if (attachment.length) note.attachment = attachment; … … 1504 1509 for (const s of subs) { 1505 1510 tlStmts().ins.run(o.id, s.slug, actorUri, ai.name, ai.handle, ai.icon, ai.url, html, o.url || null, o.published || null, media, o.sensitive ? 1 : 0, o.summary || null); 1511 // FEP-633c §2.2: register the ward hint on the stored object (no action yet). 1512 if (Guardianship.objectHasGuardians(o)) { try { db.prepare('UPDATE ap_timeline SET has_guardians = 1 WHERE id = ? AND slug = ?').run(o.id, s.slug); } catch { /* ignore */ } } 1506 1513 if (poll) { try { db.prepare('UPDATE ap_timeline SET poll_json = ? WHERE id = ? AND slug = ?').run(JSON.stringify(poll), o.id, s.slug); } catch { /* ignore */ } } 1507 1514 } … … 1522 1529 const help = Guardianship.isHelpRequest(o); 1523 1530 const wave = Guardianship.isWave(o); 1531 const hasG = Guardianship.objectHasGuardians(o); // §2.2 hint, register-only 1524 1532 for (const slug of slugs) { 1525 1533 try { 1526 const r = db.prepare('INSERT OR IGNORE INTO ap_mentions (slug, object_uri, note_url, actor_uri, actor_name, actor_handle, actor_icon, actor_url, content, published, help_request, wave, created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP)')1527 .run(slug, o.id, safeUrl(o.url) || null, actorUri, ai.name, ai.handle, ai.icon, ai.url, html, o.published || null, help ? 1 : 0, wave ? 1 : 0 );1534 const r = db.prepare('INSERT OR IGNORE INTO ap_mentions (slug, object_uri, note_url, actor_uri, actor_name, actor_handle, actor_icon, actor_url, content, published, help_request, wave, has_guardians, created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP)') 1535 .run(slug, o.id, safeUrl(o.url) || null, actorUri, ai.name, ai.handle, ai.icon, ai.url, html, o.published || null, help ? 1 : 0, wave ? 1 : 0, hasG ? 1 : 0); 1528 1536 if (r.changes) { 1529 1537 console.log('[AP] mention', actorUri, '→', slug, help ? '(help request)' : '');
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)