mirror of
https://github.com/vitorpamplona/Nostryfied.git
synced 2025-04-19 18:31:17 +00:00
more auth
This commit is contained in:
parent
f753cfb40f
commit
4a01bfbc7f
@ -210,9 +210,10 @@ const fetchFromRelay = async (relay, filters, pubkey, events, relayStatus) =>
|
||||
console.log(relay, subscriptionId)
|
||||
signNostrAuthEvent(relay, subscriptionId).then(
|
||||
(event) => {
|
||||
if (event)
|
||||
if (event) {
|
||||
console.log("AUTH", JSON.stringify(['EVENT', event]))
|
||||
ws.send(JSON.stringify(['EVENT', event]))
|
||||
else {
|
||||
} else {
|
||||
updateRelayStatus(relay, "AUTH Req", 0, undefined, relayStatus)
|
||||
ws.close()
|
||||
reject(relay)
|
||||
@ -228,6 +229,7 @@ const fetchFromRelay = async (relay, filters, pubkey, events, relayStatus) =>
|
||||
|
||||
if (msgType === 'OK') {
|
||||
// auth ok.
|
||||
console.log("AUTH", JSON.stringify(['EVENT', event]))
|
||||
for (const [key, sub] of Object.entries(subscriptions)) {
|
||||
ws.send(JSON.stringify(['REQ', sub.id, sub.filter]))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user