Changeset 6dd1a3f in Klonkt for src/services
- Timestamp:
- 07/04/2026 05:26:26 PM (2 months ago)
- Branches:
- main
- Children:
- 14f54a7
- Parents:
- 236e11b
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r236e11b r6dd1a3f 1839 1839 const media = JSON.stringify((note.images || []).map((u) => ({ url: u, type: 'image/jpeg' }))); 1840 1840 try { 1841 tlStmts().ins.run(id, slug, note.actor_uri || '', note.actor_name || '', note.actor_handle || '',1841 const r = tlStmts().ins.run(id, slug, note.actor_uri || '', note.actor_name || '', note.actor_handle || '', 1842 1842 note.actor_icon || '', note.actor_url || '', note.content || '', note.url || null, 1843 1843 new Date().toISOString(), media, note.sensitive ? 1 : 0, note.cw || null); 1844 if (!r.changes) { 1845 // Row already cached (INSERT OR IGNORE) → refresh it with the freshly 1846 // resolved note. Without this a row cached without its cover (or with 1847 // stale content) stayed stale forever — even boosting again didn't heal it. 1848 db.prepare('UPDATE ap_timeline SET content = ?, media_json = ?, nsfw = ?, cw = ?, url = COALESCE(?, url) WHERE slug = ? AND id = ?') 1849 .run(note.content || '', media, note.sensitive ? 1 : 0, note.cw || null, note.url || null, slug, id); 1850 } 1844 1851 } catch { /* ignore */ } 1845 1852 markBoosted(slug, id);
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)