Changeset 28b59e7 in Klonkt
- Timestamp:
- 06/30/2026 02:24:00 PM (2 months ago)
- Branches:
- main
- Children:
- 443f982
- Parents:
- 292734a
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r292734a r28b59e7 232 232 if (post.cover_image_url && !playable) urls.push(abs(post.cover_image_url)); 233 233 let body = post.content || ''; 234 if (!playable) for (const m of body.matchAll(/<img\b[^>]*\bsrc="([^"]+)"[^>]*>/gi)) urls.push(abs(m[1])); 234 // Only federate inline images we can actually serve: absolute http(s) URLs, or our own 235 // /media/ uploads. A relative path we don't host (e.g. a stale /images/... ref) would 404 236 // and show up as a black tile in Mastodon's attachment grid. 237 if (!playable) for (const m of body.matchAll(/<img\b[^>]*\bsrc="([^"]+)"[^>]*>/gi)) { 238 const src = m[1]; 239 if (/^https?:\/\//i.test(src) || src.startsWith('/media/')) urls.push(abs(src)); 240 } 235 241 body = body.replace(/<img\b[^>]*>/gi, ''); 236 242 // Audio shortcodes: do NOT federate the raw audio file — Klonkt deliberately
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)