Changeset f7ed139 in Klonkt


Ignore:
Timestamp:
06/30/2026 06:55:53 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
0fc5db5
Parents:
2ab99c0
Message:

fix(federation): keep the cover for Klonkt feeds on embed posts (note.image)

A post with an external embed (or link-only track) suppresses the cover ATTACHMENT so Mastodon
shows the player/link card. But that also stripped the cover from other Klonkt instances' Cirkel/
News feed (no thumbnail). Now set the Mastodon-ignored AS2 note.image whenever the cover attachment
is suppressed (not just hosted audio) — Klonkt's handleInbox reads it; Mastodon's card stays intact.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/ActivityPubService.js

    r2ab99c0 rf7ed139  
    367367  if (post.nsfw) note.summary = post.content_warning || 'Gevoelige inhoud';
    368368  if (attachment.length) note.attachment = attachment;
    369   // Playable-audio posts suppress the cover attachment (player card). Still expose
    370   // the cover via AS2 `image` so card/grid consumers (the Klonkt Cirkel) can show
    371   // it — Mastodon ignores a Note's `image`, so the player card is unaffected.
    372   if (post.cover_image_url && playable) {
     369  // When the cover attachment is suppressed (hosted audio OR an external embed/link-only track →
     370  // so Mastodon shows the player/link card, not media), still expose the cover via AS2 `image` so
     371  // card/grid consumers (the Klonkt Cirkel/News feed) can show it. Mastodon ignores a Note's
     372  // `image`, so its card is unaffected — but a Klonkt receiver reads it (handleInbox o.image).
     373  if (post.cover_image_url && noImages) {
    373374    const cov = abs(post.cover_image_url);
    374375    if (cov) note.image = { type: 'Image', mediaType: mediaType(cov), url: cov };
Note: See TracChangeset for help on using the changeset viewer.