add missing id arguments.

This commit is contained in:
fiatjaf
2021-12-13 21:21:26 -03:00
parent 06e867b675
commit 4f0cae0eb8
3 changed files with 11 additions and 8 deletions

View File

@@ -145,12 +145,15 @@ export function relayConnect(url, onNotice) {
try {
await trySend(['EVENT', event])
statusCallback(0)
let {unsub} = relay.sub({
cb: () => {
statusCallback(1)
let {unsub} = relay.sub(
{
cb: () => {
statusCallback(1)
},
filter: {id: event.id}
},
filter: {id: event.id}
})
`monitor-${event.id.slice(0, 5)}`
)
setTimeout(unsub, 5000)
} catch (err) {
statusCallback(-1)