Files
bitvid/dist/js/nostr/utils.js
T
2026-03-04 11:22:49 -05:00

13 lines
277 B
JavaScript

// js/nostr/utils.js
export function getActiveKey(video) {
if (video.videoRootId) {
return `ROOT:${video.videoRootId}`;
}
const dTag = video.tags?.find((t) => t[0] === "d");
if (dTag) {
return `${video.pubkey}:${dTag[1]}`;
}
return `LEGACY:${video.id}`;
}