Changeset 006a3be in Klonkt


Ignore:
Timestamp:
07/04/2026 05:05:30 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
b7e382f
Parents:
8b5c076
Message:

fix(ap): boosted post keeps its cover when you don't follow the author

Boosting a post from someone you DON'T follow resolves the note via
resolveRemoteNote() (authorize_interaction/boost -> upsertBoostedNote),
which extracted images only from attachment. A Klonkt hosted-audio
post deliberately strips its cover from attachment (so Mastodon shows
the player card) and carries it in image instead — so the cover was
lost. Posts from FOLLOWED accounts go through mediaFromNote(), which
already falls back to image; resolveRemoteNote() now does the same.

Verified in isolation: cover extracted from image (object/string/array),
attachment still wins when present, no duplication, non-http rejected
(SSRF-safe). Full suite 45/45.

  • src/services/ActivityPubService.js — image fallback in resolveRemoteNote
  • CHANGELOG(.nl/.de).md — user-facing entry under Unreleased (3 languages)

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

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG.de.md

    r8b5c076 r006a3be  
    55
    66## [Unreleased]
     7
     8### Behoben
     9- **Geteilte Musikbeiträge behalten ihr Cover.** Wenn du einen Titel von jemandem
     10  geteilt (geboostet) hast, dem du nicht folgst, fehlte das Cover; es wird jetzt
     11  angezeigt, genau wie bei Personen, denen du folgst.
    712
    813## [1.3.2] — 2026-07-02
  • CHANGELOG.md

    r8b5c076 r006a3be  
    55
    66## [Unreleased]
     7
     8### Fixed
     9- **Boosted music posts keep their cover.** When you boosted a track from
     10  someone you don't follow, the cover art went missing; it now shows, just like
     11  for people you do follow.
    712
    813## [1.3.2] — 2026-07-02
  • CHANGELOG.nl.md

    r8b5c076 r006a3be  
    55
    66## [Unreleased]
     7
     8### Opgelost
     9- **Geboooste muziekposts houden hun cover.** Als je een nummer boostte van
     10  iemand die je niet volgt, ontbrak de cover; die verschijnt nu wel, net als bij
     11  mensen die je wél volgt.
    712
    813## [1.3.2] — 2026-07-02
  • src/services/ActivityPubService.js

    r8b5c076 r006a3be  
    16371637    .filter((a) => a && a.url && (!a.mediaType || /^image\//i.test(a.mediaType)))
    16381638    .map((a) => safeUrl(a.url)).filter(Boolean);
     1639  // A Klonkt hosted-audio post strips its cover from `attachment` (so Mastodon
     1640  // shows the player card, not a loose image) and puts it in `image` instead.
     1641  // Same fallback as mediaFromNote() so a boosted music post keeps its cover.
     1642  if (!images.length && note.image) {
     1643    const im = Array.isArray(note.image) ? note.image[0] : note.image;
     1644    const iu = safeUrl(typeof im === 'string' ? im : (im && im.url));
     1645    if (iu) images.push(iu);
     1646  }
    16391647  return {
    16401648    object_uri: safeUrl(note.id) || note.id,
Note: See TracChangeset for help on using the changeset viewer.