Skip to content

Conversation

vitorpamplona
Copy link
Collaborator

Adds the simplistic idea to give users some feedback for sent DMs as discussed in #1994

This also serves as a heartbeat event to check if users are still using their NIP-17 clients, regardless of their DM relay configurations.

@staab
Copy link
Member

staab commented Aug 1, 2025

I like this. One possible addition might be to set created_at to the timestamp of the last message received, rather than "now". This would account for clock differences and events in transit at the expense of a tiny amount of metadata leakage.

@staab
Copy link
Member

staab commented Aug 1, 2025

Also, this should clarify that the messages should be marked as received by the counterparty. The user himself might not have read the message, and that should be tracked differently.

@vitorpamplona
Copy link
Collaborator Author

I like this. One possible addition might be to set created_at to the timestamp of the last message received, rather than "now". This would account for clock differences and events in transit at the expense of a tiny amount of metadata leakage.

Wouldn't that expose the timing of messages as this event gets updated over time. One could track the time of all the messages you received by observing this event.

I thought about doing some time randomization in this event too, but I am not sure if it is worth it.

@staab
Copy link
Member

staab commented Aug 1, 2025

Yeah, it would. Maybe we could just recommend setting the timestamp to greatest(now - 30, last_event_created_at)

@kehiy
Copy link
Contributor

kehiy commented Aug 1, 2025

Which cases it covers? received, seen and online/isTyping and...?

Maybe we have to open a general issue and discuss this features there and then apply the final thing.

Co-authored-by: fiatjaf_ <fiatjaf@gmail.com>
@vitorpamplona
Copy link
Collaborator Author

Which cases it covers? received, seen and online/isTyping and...?

Just received.

I actually have not seen people asking to show "Seen" or "Typing". "Is Typing" is particularly intrusive and questionable in terms of privacy.

They do want some feedback to know if the user can reply, though.

@kehiy
Copy link
Contributor

kehiy commented Aug 1, 2025

Good.

I don't agree to stop developing online, seen and isTyping features. People don't ask for it because the Nostr have 300k(?) users and most of them will be OK with an IRC like interface too!
People will come from +1B platforms like Telegram, WhatsApp, and ...

If you think of privacy, we need to consider:

  1. In term of seen, isTyping, only other person on chat can see it. (If it's a group, you can even select). So its not public.
  2. For all cases: online, seen, isTyping and received, you can simply turn it off.

@kehiy
Copy link
Contributor

kehiy commented Aug 1, 2025

But overall this approach for received case seems to be decent.

@vitorpamplona
Copy link
Collaborator Author

I don't agree to stop developing online, seen and isTyping features.

Nobody is saying that.

@mikedilger
Copy link
Contributor

I don't see how this event indicates that you received my DM. If the created_at changes, that is not necessarily from my DM, it could have been from anybody's DM. It is assuming DMs are very rare things? Or is it listing which ones got through somewhere (didn't see that).

@vitorpamplona
Copy link
Collaborator Author

No, it is assuming everything gets through to the inbox DM of the receiver. I have not seen issues that DMs are not getting through. Does this happen? The goal here is just to report that the user is using a NIP-17 client and has recently downloaded and decrypted all messages available to him/her

@staab
Copy link
Member

staab commented Aug 1, 2025

DMs sometimes don't get through due to poor inbox selections and clients not retrying when rate limited, but it's ok if this PR assumes that DMs work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants