Compare commits

...

1 Commits

Author SHA1 Message Date
fiatjaf
3ca3160202 fix missing ! in CheckID() 2024-09-25 14:33:43 -03:00

View File

@@ -127,7 +127,7 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
switch env := envelope.(type) {
case *nostr.EventEnvelope:
// check id
if env.Event.CheckID() {
if !env.Event.CheckID() {
ws.WriteJSON(nostr.OKEnvelope{EventID: env.Event.ID, OK: false, Reason: "invalid: id is computed incorrectly"})
return
}