fixes and tweaks from nak port work.
This commit is contained in:
@@ -17,7 +17,7 @@ type RelayReadWrite struct {
|
||||
Write bool `json:"write"`
|
||||
}
|
||||
|
||||
func (s Session) ParseRequest(event *nostr.Event) (Request, error) {
|
||||
func (s Session) ParseRequest(event nostr.Event) (Request, error) {
|
||||
var req Request
|
||||
|
||||
plain, err := nip44.Decrypt(event.Content, s.ConversationKey)
|
||||
|
||||
@@ -71,7 +71,7 @@ func (p *DynamicSigner) setSession(clientPubkey nostr.PubKey, session Session) {
|
||||
p.sessions[clientPubkey] = session
|
||||
}
|
||||
|
||||
func (p *DynamicSigner) HandleRequest(ctx context.Context, event *nostr.Event) (
|
||||
func (p *DynamicSigner) HandleRequest(ctx context.Context, event nostr.Event) (
|
||||
req Request,
|
||||
resp Response,
|
||||
eventResponse nostr.Event,
|
||||
|
||||
@@ -35,7 +35,7 @@ func (r Response) String() string {
|
||||
|
||||
type Signer interface {
|
||||
GetSession(client nostr.PubKey) (Session, bool)
|
||||
HandleRequest(context.Context, *nostr.Event) (req Request, resp Response, eventResponse nostr.Event, err error)
|
||||
HandleRequest(context.Context, nostr.Event) (req Request, resp Response, eventResponse nostr.Event, err error)
|
||||
}
|
||||
|
||||
func IsValidBunkerURL(input string) bool {
|
||||
|
||||
@@ -60,7 +60,7 @@ func (p *StaticKeySigner) getOrCreateSession(clientPubkey nostr.PubKey) (Session
|
||||
return session, nil
|
||||
}
|
||||
|
||||
func (p *StaticKeySigner) HandleRequest(_ context.Context, event *nostr.Event) (
|
||||
func (p *StaticKeySigner) HandleRequest(_ context.Context, event nostr.Event) (
|
||||
req Request,
|
||||
resp Response,
|
||||
eventResponse nostr.Event,
|
||||
|
||||
Reference in New Issue
Block a user