fix(nostr): implement missing resolveEventDTag in NostrClient

Added the `resolveEventDTag` method to the `NostrClient` class in `js/nostr/client.js`. This method was referenced in `editVideo` and `hydrateVideoHistory` but was missing from the implementation, causing `TypeError` in tests. The implementation delegates to `getDTagValueFromTags` from `js/nostr/nip71.js`.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-09 18:45:26 +00:00
1 parent 25551592ad
commit 56b23be427
1 file changed
+12
+12
View File
@@ -927,6 +927,18 @@ export class NostrClient {
return this.connectionManager.makeCountUnsupportedError(relayUrl);
}
resolveEventDTag(event, fallbackEvent = null) {
if (event && event.tags) {
const dTag = getDTagValueFromTags(event.tags);
if (dTag) return dTag;
}
if (fallbackEvent && fallbackEvent.tags) {
const dTag = getDTagValueFromTags(fallbackEvent.tags);
if (dTag) return dTag;
}
return "";
}
applyRootCreatedAt(video) {
if (!video || typeof video !== "object") return;
const rootId = video.videoRootId;