Changeset 5085b1d in Klonkt for src/services
- Timestamp:
- 06/25/2026 07:11:20 AM (3 months ago)
- Branches:
- main
- Children:
- 2af2e69
- Parents:
- f1e0c1f
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
rf1e0c1f r5085b1d 22 22 const PUBLIC = 'https://www.w3.org/ns/activitystreams#Public'; 23 23 const MAX_OUTBOX = 20; 24 // Cache-buster for the music listen-link → forces Mastodon to re-crawl a FRESH 25 // (square) player card. Bump this whenever the twitter:player card dimensions change. 26 const FEDI_CARD_VER = '2'; 24 27 25 28 // ── RSA keys per actor (lazy, cached in DB) ─────────────────────── … … 155 158 if (hadAudio) { 156 159 const lbl = audioLabels.length ? esc(audioLabels.slice(0, 4).join(', ')) : ''; 157 body += `<p>🎵 ${lbl ? `<strong>${lbl}</strong> — ` : ''}<a href="${human}">listen on ${esc(site.title || 'the site')}</a></p>`; 160 // For playable posts, append a version param to the listen-link so Mastodon 161 // sees a NEW card URL and re-crawls it (fresh SQUARE player card) instead of 162 // reusing the cached landscape one. Invisible: the link TEXT stays clean, the 163 // page ignores the param. Bump FEDI_CARD_VER when the card dimensions change. 164 const listenHref = playable ? `${human}?fc=${FEDI_CARD_VER}` : human; 165 body += `<p>🎵 ${lbl ? `<strong>${lbl}</strong> — ` : ''}<a href="${listenHref}">listen on ${esc(site.title || 'the site')}</a></p>`; 158 166 } 159 167 const seen = new Set();
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)