diff --git a/17.md b/17.md index 59d47f1e..17979779 100644 --- a/17.md +++ b/17.md @@ -37,7 +37,10 @@ Following [NIP-59](59.md), the **unsigned** chat messages must be sealed (`kind: "pubkey": senderIdentityKey.public, "created_at": randomTimeUpTo2DaysInThePast, "kind": 13, // seal - "tags": [], // no tags + "tags": [ + // when senderEncryptionKey != senderIdentityKey (see below) + ["n", senderEncryptionKey.public] + ], "content": nip44.encrypt( unsignedMessageRumor, nip44.compute_conversation_key(senderEncryptionKey.private, receiverEncryptionKey.public) @@ -79,6 +82,8 @@ The existence of this event shows that the receiver wants to receive messages en When sending, `p`-tagging the receiver should still use their _identity key_; and when receiving messages the receiver should still assume the `"author"` field of the seal event contains the _identity key_. +An `n` tag set to `senderEncryptionKey.public` MUST be added to the seal event when the _encryption key_ is different from the _identity key_. + ## Publishing Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs.