now it works.

This commit is contained in:
fiatjaf
2021-01-10 00:03:33 -03:00
parent 65e6f22a00
commit 13dcdf39e3
5 changed files with 11 additions and 11 deletions

View File

@@ -38,11 +38,11 @@ export function relayConnect(url, onEvent, onNotice) {
console.log('message from relay ' + url + ': ' + data[1])
onNotice(data[1])
} else if (typeof data[0] === 'object') {
let context = data[0]
let event = data[1]
let event = data[0]
let context = data[1]
if (await verifySignature(event)) {
onEvent(context, event)
onEvent(event, context)
} else {
console.warn(
'got event with invalid signature from ' + url,