temporary _onauth handler until we figure stuff out.

This commit is contained in:
fiatjaf 2024-04-05 07:22:17 -03:00
parent e5cda3509c
commit 1d7620a057
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,9 @@ export class AbstractRelay {
public onclose: (() => void) | null = null
public onnotice: (msg: string) => void = msg => console.debug(`NOTICE from ${this.url}: ${msg}`)
// this is exposed just to help in ndk migration, shouldn't be relied upon
public _onauth: ((challenge: string) => void) | null = null
public baseEoseTimeout: number = 4400
public connectionTimeout: number = 4400
public openSubs: Map<string, Subscription> = new Map()
@ -215,6 +218,7 @@ export class AbstractRelay {
return
case 'AUTH': {
this.challenge = data[1] as string
this._onauth?.(data[1] as string)
return
}
}