scsibug / nostr-rs-relay

Mirror of https://sr.ht/~gheartsfield/nostr-rs-relay/
MIT License
593 stars 161 forks source link

OK message for ephemeral events #220

Open kumulynja opened 5 days ago

kumulynja commented 5 days ago

It seems like an OK message is only send for events that are persisted, not for ephemeral events. This is concluded from testing with nip47 request and response events and from seeing the following issue for nip42 that also uses ephemeral events: https://github.com/scsibug/nostr-rs-relay/issues/213

As NIP01 describes, all events should be acknowledged or denied by an OK message, so that also includes ephemeral events, as other relays do.

OK messages MUST be sent in response to EVENT messages received from clients, they must have the 3rd parameter set to true when an event has been accepted by the relay, false otherwise.