From 56b23be427a5f3c7cb500bc49f3cfe11f0e7542e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 18:45:26 +0000 Subject: [PATCH] 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 <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/nostr/client.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/nostr/client.js b/js/nostr/client.js index accbd0be..4ce6aecb 100644 --- a/js/nostr/client.js +++ b/js/nostr/client.js @@ -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;