You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: integration tests for NIP-04 Encrypted Direct Messages (Kind 4) #506
NIP-04 encrypted direct messages (kind 4) are listed in the relay's supported NIPs but have no integration test coverage. The flow differs from kind 1 in that messages are targeted to a recipient via a p tag, and access control (if any) hinges on that tag.
What to test
Alice publishes a kind 4 event with Bob's pubkey in a p tag → accepted and stored
Alice can retrieve her sent DM by event ID
Bob subscribes with a filter for #p matching his pubkey → receives Alice's DM
A third party (Charlie) subscribed to Bob's pubkey filter should not receive the encrypted content differently (relay stores and forwards the ciphertext as-is)
Duplicate kind 4 event submission → returns duplicate: command result
Hi! I’d like to work on this :-)
I'm planning to add a nip-04.feature + step definitions file following the same pattern as the existing NIP tests. Will cover all the cases mentioned -send, retrieve by ID, #p filter, Charlie forwarding, and duplicate rejection.
Activity
Priyanshubhartistm commentedon Apr 18, 2026
Hi @phoenix-server ,@cameri , Could you please assign this to me ?
kanishka0411 commentedon Apr 19, 2026
Hi! I’d like to work on this :-)
I'm planning to add a nip-04.feature + step definitions file following the same pattern as the existing NIP tests. Will cover all the cases mentioned -send, retrieve by ID, #p filter, Charlie forwarding, and duplicate rejection.
Priyanshubhartistm commentedon Apr 22, 2026
hii @cameri
could you please assign this to me
cameri commentedon May 7, 2026
thanks @Priyanshubhartistm