Propagate video root identifier from pointer metadata

This commit is contained in:
thePR0M3TH3AN committed 2025-11-14 09:30:01 -05:00
1 parent fb20487e4d
commit 04e72a0b46
4 files changed
+122 -3

No files matched your search

+10 -2
View File
@@ -161,7 +161,10 @@ export default class VideoModalCommentController {
}
const videoKind = normalizeKind(video.kind);
const videoAuthorPubkey = normalizeString(video.pubkey);
const videoRootId = normalizeString(video.videoRootId);
const pointerRootId = normalizeString(
video.pointerIdentifiers?.videoRootId,
);
const videoRootId = normalizeString(video.videoRootId) || pointerRootId;
const videoRootRelay = normalizeRelay(
video.videoRootRelay || video.rootIdentifierRelay,
);
@@ -611,8 +614,13 @@ export default class VideoModalCommentController {
this.modalCommentState.videoKind || normalizeKind(video.kind);
const videoAuthorPubkey =
this.modalCommentState.videoAuthorPubkey || normalizeString(video.pubkey);
const fallbackPointerRootId = normalizeString(
video.pointerIdentifiers?.videoRootId,
);
const videoRootId =
this.modalCommentState.videoRootId || normalizeString(video.videoRootId);
this.modalCommentState.videoRootId ||
normalizeString(video.videoRootId) ||
fallbackPointerRootId;
const videoRootRelay =
this.modalCommentState.videoRootRelay ||
normalizeRelay(video.videoRootRelay || video.rootIdentifierRelay);