mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-28 18:51:53 +01:00
implement ping method in nip46 signers
This commit is contained in:
parent
03ae3812c8
commit
1b6ac1fe0a
@ -257,6 +257,8 @@ func (p *DynamicSigner) HandleRequest(event *nostr.Event) (
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
result = plaintext
|
result = plaintext
|
||||||
|
case "ping":
|
||||||
|
result = "pong"
|
||||||
default:
|
default:
|
||||||
return req, resp, eventResponse,
|
return req, resp, eventResponse,
|
||||||
fmt.Errorf("unknown method '%s'", req.Method)
|
fmt.Errorf("unknown method '%s'", req.Method)
|
||||||
|
@ -232,6 +232,8 @@ func (p *StaticKeySigner) HandleRequest(event *nostr.Event) (
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
result = plaintext
|
result = plaintext
|
||||||
|
case "ping":
|
||||||
|
result = "pong"
|
||||||
default:
|
default:
|
||||||
return req, resp, eventResponse,
|
return req, resp, eventResponse,
|
||||||
fmt.Errorf("unknown method '%s'", req.Method)
|
fmt.Errorf("unknown method '%s'", req.Method)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user