implement ping method in nip46 signers

This commit is contained in:
jiftechnify 2024-10-01 19:10:05 +09:00 committed by fiatjaf_
parent 03ae3812c8
commit 1b6ac1fe0a
2 changed files with 4 additions and 0 deletions

View File

@ -257,6 +257,8 @@ func (p *DynamicSigner) HandleRequest(event *nostr.Event) (
break
}
result = plaintext
case "ping":
result = "pong"
default:
return req, resp, eventResponse,
fmt.Errorf("unknown method '%s'", req.Method)

View File

@ -232,6 +232,8 @@ func (p *StaticKeySigner) HandleRequest(event *nostr.Event) (
break
}
result = plaintext
case "ping":
result = "pong"
default:
return req, resp, eventResponse,
fmt.Errorf("unknown method '%s'", req.Method)