Closed dicklarsson closed 5 months ago
I recommend that you read https://nips.nostr.com/1 and https://nips.nostr.com/4, but the answer is:
relay.subscribe([{"#p":["<receiver-pubkey>"],"kinds":[4]}, {"authors":["<sender-pubkey>"],"kinds":[4]}], ...)
The README provides a brief and concise example of how to subscribe to an existing event. However, how can I subscribe to or listen for direct messages?
"As user ALICE, how can I subscribe to all incoming private messages?"