From f45d82acbed9b7597e54fc49a5643d01d3111d52 Mon Sep 17 00:00:00 2001 From: Kay Date: Fri, 7 Feb 2025 21:36:55 +0000 Subject: [PATCH] nip-17: support seen events. --- 17.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/17.md b/17.md index f091a969..74fe2c7a 100644 --- a/17.md +++ b/17.md @@ -84,7 +84,7 @@ Clients CAN offer disappearing messages by setting an `expiration` tag in the gi ## Publishing -Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs. +Kind `10050` indicates the user's preferred relays to receive DMs based on [NIP-51](51.md). The event MUST include a list of `relay` tags with relay URIs. ```jsonc { @@ -100,6 +100,32 @@ Kind `10050` indicates the user's preferred relays to receive DMs. The event MUS Clients SHOULD publish kind `14` events to the `10050`-listed relays. If that is not found that indicates the user is not ready to receive messages under this NIP and clients shouldn't try. +## Seen status + +A client MAY publish a kind `30010` which means saw messages with a `"d"` tag set to receivers pubkey. + +The `.content` field is a base64 encoded string of a bloom filter containing message ids (gift wrapped) saw by receiver. + +The sender pubkey's client MAY query that specific event to check which messaged in this chat is seen by receiver to enhance user experience. + +Example event: + +```json +{ + "kind": 30010, + "created_at": 1738964056, + "tags": [ + [ + "d", + "bd4ae3e67e29964d494172261dc45395c89f6bd2e774642e366127171dfb81f5" + ] + ], + "content": "AAAAAAAACJEAAAAAAAAAAQAAAAAAAAiRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", +} +``` + +A client MAY encrypt the `.content` based on [NIP-44](44.md) for more privacy. + ## Relays It's advisable that relays do not serve `kind:1059` to clients other than the ones tagged in them.