mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Merge pull request #243 from PR0M3TH3AN/codex/fix-watch-history-not-displaying-videos
Stop registering deprecated relay publish handlers
This commit is contained in:
1 file changed
+9
-2
+9
-2
@@ -115,11 +115,18 @@ export function publishEventToRelay(pool, url, event, options = {}) {
|
||||
let handlerRegistered = false;
|
||||
handlerRegistered =
|
||||
registerHandler("ok", handleSuccess) || handlerRegistered;
|
||||
handlerRegistered =
|
||||
registerHandler("seen", handleSuccess) || handlerRegistered;
|
||||
handlerRegistered =
|
||||
registerHandler("failed", handleFailure) || handlerRegistered;
|
||||
|
||||
// [email protected] removed the optional "seen" callback from relay
|
||||
// publish handles. Attempting to register it now produces an
|
||||
// asynchronous TypeError that bubbles up as an unhandled rejection and
|
||||
// prevents watch-history snapshots from ever resolving. We therefore
|
||||
// skip registering a "seen" listener and rely on "ok" (per NIP-20) for
|
||||
// success notifications. Legacy relays that only emit "seen" fall back
|
||||
// to the optimistic success path below because no handlers end up
|
||||
// registered.
|
||||
|
||||
if (handlerRegistered) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user