nostr: fix parsing of OK events

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-07-31 13:25:18 -07:00
parent c007cbd4f2
commit d43c46aaf4

View File

@@ -107,7 +107,7 @@ impl<'a> RelayMessage<'a> {
// OK (NIP-20)
// Relay response format: ["OK",<event_id>, <true|false>, <message>]
if &msg[0..=4] == "[\"OK\"," {
if &msg[0..=5] == "[\"OK\"," {
// TODO: fix this
let event_id = &msg[7..71];
let booly = &msg[73..77];