mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 16:50:16 +01:00
nip46: fix HandleRequest request parsing logic
Move out the `session.ParseRequest` call from the `else` branch. This caused an empty `Request` object to be used down in the function when the `Session` already existed.
This commit is contained in:
@@ -105,11 +105,11 @@ func (p *DynamicSigner) HandleRequest(event *nostr.Event) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.setSession(event.PubKey, session)
|
p.setSession(event.PubKey, session)
|
||||||
|
}
|
||||||
|
|
||||||
req, err = session.ParseRequest(event)
|
req, err = session.ParseRequest(event)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return req, resp, eventResponse, fmt.Errorf("error parsing request: %w", err)
|
return req, resp, eventResponse, fmt.Errorf("error parsing request: %w", err)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var secret string
|
var secret string
|
||||||
|
|||||||
Reference in New Issue
Block a user