Fix comment address fallback when video tags missing

This commit is contained in:
thePR0M3TH3AN committed 2025-11-03 11:36:39 -05:00
1 parent 3445ef9059
commit e704b93287
2 files changed
+75 -2

No files matched your search

+12 -2
View File
@@ -144,7 +144,12 @@ export default class VideoModalCommentController {
}
const videoEventId = normalizeString(video.id);
const videoDefinitionAddress = buildVideoAddressPointer(video);
let videoDefinitionAddress = buildVideoAddressPointer(video);
if (!videoDefinitionAddress && this.modalCommentState.videoDefinitionAddress) {
videoDefinitionAddress = normalizeString(
this.modalCommentState.videoDefinitionAddress,
);
}
const videoKind = normalizeKind(video.kind);
const videoAuthorPubkey = normalizeString(video.pubkey);
@@ -544,7 +549,12 @@ export default class VideoModalCommentController {
}
const videoEventId = normalizeString(video.id);
const videoDefinitionAddress = buildVideoAddressPointer(video);
let videoDefinitionAddress = buildVideoAddressPointer(video);
if (!videoDefinitionAddress && this.modalCommentState.videoDefinitionAddress) {
videoDefinitionAddress = normalizeString(
this.modalCommentState.videoDefinitionAddress,
);
}
const videoKind =
this.modalCommentState.videoKind || normalizeKind(video.kind);
const videoAuthorPubkey =