Changeset 30271e6 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/25/2026 06:13:00 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
6c3d805
Parents:
2923a95
Message:

fix(fediverse): player card only for playable (hosted) audio; scope embed strictly

A link-only track (external, media_id NULL) has no hosted audio, so it must not get
a Klonkt player card — and /embed?post= must not fall back to ALL site tracks (that
showed unrelated songs). New hasPlayableAudio() gates the player card + cover-
suppression on a real file-backed track; link-only audio keeps its cover. /embed?post
now scopes strictly to the post's tracks (no all-site fallback).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r2923a95 r30271e6  
    848848    canManageSite,
    849849    siteAvatar,
     850    postHasPlayableAudio: ActivityPubService.hasPlayableAudio(post.content || '', site.id),
    850851    pageTitle: post.title + ' - ' + site.title,
    851852    socialDescr: post.excerpt || '',
Note: See TracChangeset for help on using the changeset viewer.