mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-12 10:08:49 +00:00
fix tests, .seenOn() method for pools.
This commit is contained in:
6
relay.ts
6
relay.ts
@@ -30,9 +30,9 @@ export type Sub = {
|
||||
}
|
||||
|
||||
export type SubscriptionOptions = {
|
||||
skipVerification?: boolean
|
||||
alreadyHaveEvent?: null | ((id: string) => boolean)
|
||||
id?: string
|
||||
skipVerification?: boolean
|
||||
alreadyHaveEvent?: null | ((id: string, relay: string) => boolean)
|
||||
}
|
||||
|
||||
export function relayInit(url: string): Relay {
|
||||
@@ -112,7 +112,7 @@ export function relayInit(url: string): Relay {
|
||||
if (
|
||||
so &&
|
||||
so.alreadyHaveEvent &&
|
||||
so.alreadyHaveEvent(getHex64(json, 'id'))
|
||||
so.alreadyHaveEvent(getHex64(json, 'id'), url)
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user