Changeset d3a1abd in Klonkt for test/c2s-compose.test.js


Ignore:
Timestamp:
07/30/2026 09:22:06 AM (6 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
a9da2c0
Parents:
aa189d1
Message:

Gefedereerde content is schoon van media-tags

Robins schermafdrukken (30-7): twee videos in de Shaer-reader, een kapot. De
wortel zat hier: buildNote stript img-tags al uit de uitgaande content, maar
de video- en audio-tags van de nieuwe composer-posts niet. Elke remote lezer
kreeg de tag (relatieve /media-src, overal dood behalve op ons eigen web) EN
het attachment (absoluut, werkend): een kapotte speler boven de goede.

Video en audio verlaten de gefedereerde content nu op dezelfde manier als
afbeeldingen: ze rijden als AS2-attachments. Het web houdt zijn tags; de
strip is federatie-only.

Changed files:
src/services/ActivityPubService.js

  • buildNote stript video/audio-tags uit de uitgaande body

test/c2s-compose.test.js

  • de note-content is schoon van media-tags

remarks: 341 tests groen. De app-kant (defensieve strip voor oude notes en
oude servers) zit in de app-repos (android 83791cb, iOS fddb122).

-robo
Co-Authored-By: Claude Opus 5 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/c2s-compose.test.js

    raa189d1 rd3a1abd  
    4444
    4545  const note = AP.buildNote('https://test.example', site, post);
     46  // The FEDERATED content carries no media tags: they ride as attachments,
     47  // and the tags' relative /media srcs are dead everywhere but our own web.
     48  // Leaving them in showed every remote reader a broken player above the
     49  // working one (Robins schermafdruk, 30-7).
     50  assert.ok(!/<(video|audio|img)\b/i.test(note.content), 'the note content is clean of media tags');
    4651  const att = note.attachment || [];
    4752  const img = att.find((a) => a.url.endsWith('/media/reply-media/foto.jpg'));
Note: See TracChangeset for help on using the changeset viewer.