Changeset 0688b5f in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 07/01/2026 07:06:45 PM (2 months ago)
- Branches:
- main
- Children:
- 1c2dcba
- Parents:
- d18c60e
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
rd18c60e r0688b5f 400 400 // make it JSON-LD-clean with a context term, otherwise it degrades to the player card. 401 401 if (playable) note.embedUrl = `${base}/embed?post=${encodeURIComponent(post.slug)}`; 402 // Content language → AS2 contentMap (a BCP-47-keyed copy of the content). Mastodon reads the 403 // language from its key for the timeline language filter + the translate button. Emitted 404 // alongside `content` (Mastodon sends both); a plain receiver just uses `content`. 405 if (post.language && /^[a-z]{2,3}(-[A-Za-z]{2,4})?$/.test(post.language)) note.contentMap = { [post.language]: note.content }; 402 406 // A hosted poll → federate as an AS2 Question (options + live tally). Do this last so it 403 407 // reuses the note's content/addressing/tags, then swaps the type and strips media.
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)