fix tests, .seenOn() method for pools.

This commit is contained in:
fiatjaf
2023-02-09 15:10:42 -03:00
parent e9acc59809
commit d46c5f947c
5 changed files with 43 additions and 20 deletions

View File

@@ -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
}