Changeset bfe4a55 in Klonkt for src/routes/posts.js
- Timestamp:
- 08/08/2026 12:45:53 AM (5 weeks ago)
- Branches:
- main
- Children:
- 4f97b70
- Parents:
- 457e87b
- git-author:
- Robin <roboburr@…> (08/08/2026 12:45:39 AM)
- git-committer:
- Robin <roboburr@…> (08/08/2026 12:45:53 AM)
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r457e87b rbfe4a55 284 284 for (const m of c.matchAll(/\[\[track:([A-Za-z0-9_-]+)\]\]/g)) db.prepare('UPDATE audio_tracks SET fedi_open = 1 WHERE id = ? AND site_id = ?').run(m[1], siteId); 285 285 for (const m of c.matchAll(/\[\[album:([^\]]+)\]\]/g)) db.prepare('UPDATE audio_tracks SET fedi_open = 1 WHERE site_id = ? AND album = ?').run(siteId, m[1].trim()); 286 for (const m of c.matchAll(/\[\[playlist:([A-Za-z0-9_-]+)\]\]/g)) db.prepare('UPDATE audio_tracks SET fedi_open = 1 WHERE id IN (SELECT track_id FROM playlist_tracks WHERE playlist_id = ?)').run(m[1]); 286 // playlists.id is a GLOBAL key, so the site filter has to sit on the tracks: without it a 287 // post on site A embedding site B's playlist would open B's files — permanently. 288 for (const m of c.matchAll(/\[\[playlist:([A-Za-z0-9_-]+)\]\]/g)) db.prepare('UPDATE audio_tracks SET fedi_open = 1 WHERE site_id = ? AND id IN (SELECT track_id FROM playlist_tracks WHERE playlist_id = ?)').run(siteId, m[1]); 287 289 } catch { /* non-fatal */ } 288 290 }
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)