Changeset af6e085 in Klonkt
- Timestamp:
- 07/26/2026 08:23:26 AM (6 weeks ago)
- Branches:
- main
- Children:
- 46a30f0
- Parents:
- 6fd0e20
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r6fd0e20 raf6e085 2761 2761 // during a flux window, e.g. a fleet-wide update), and drops notes that are gone 2762 2762 // (404/410). Bump SELFHEAL_VERSION only on a release that warrants a re-sync. 2763 const SELFHEAL_VERSION = 1 1; // v11: also resolve the FEP-044f embedded quote card (quote_json) onto already-cached posts2763 const SELFHEAL_VERSION = 12; // v12: quote card snapshot media as array + quoted-post emojis 2764 2764 async function fetchNoteAP(url) { 2765 2765 try { … … 2794 2794 : (q.attributedTo && typeof q.attributedTo.id === 'string' ? q.attributedTo.id : null); 2795 2795 const ai = authorUri ? actorInfo(await fetchActor(authorUri), authorUri) : null; 2796 // The quoted post's own FEP-9098 emojis, so :shortcode: renders in the card. 2797 const emojis = {}; 2798 try { 2799 for (const e of JSON.parse(extractEmojiTags(q.tag) || '[]')) { 2800 const u = e.icon && (e.icon.url || (Array.isArray(e.icon) && e.icon[0] && e.icon[0].url)); 2801 if (typeof e.name === 'string' && u) emojis[e.name] = u; 2802 } 2803 } catch { /* ignore */ } 2804 let media = []; try { media = JSON.parse(mediaFromNote(q)); } catch { /* ignore */ } 2796 2805 const snapshot = { 2797 2806 url: safeUrl(q.url || q.id || url) || url, … … 2799 2808 content: HtmlSanitizerService.sanitize(q.content || ''), 2800 2809 published: q.published || null, 2801 media: mediaFromNote(q), 2810 media, 2811 emojis: Object.keys(emojis).length ? emojis : undefined, 2802 2812 }; 2803 2813 return JSON.stringify(snapshot);
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)