Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for notification "threading" #3

Open
kylef opened this issue May 2, 2020 · 3 comments
Open

Support for notification "threading" #3

kylef opened this issue May 2, 2020 · 3 comments

Comments

@kylef
Copy link
Member

kylef commented May 2, 2020

To be able to group message notifications together by a buffer (in APNS terms that's notification threading which is achieve by attaching a theadId to the notification). We need to construct a thread identifier which is unique to the buffer. There is a proposal at cocodelabs/api.palaverapp.com#58 for doing this base on network UUID + buffer name, however this is flawed as it doesn't count for the case insensitive nature of the buffer names (nicknames and channel names).

I can think of two solutions:

  1. The API request contains the case mapping for the IRC server so that it can do appropriate normalisation.
  2. The sender and channel names are normalised on the server implementation side.

I think soltion 1 may be the best approach, normalisation logic is in one place and we have the original cased channel and sender so that we can display these in the interface as-is instead of in the normalised form.

@kylef
Copy link
Member Author

kylef commented May 2, 2020

@slingamn perhaps you may have some suggestions given your interest in #2.

@slingamn
Copy link

You know more about this than I do, but my feeling is that the typical server implementation (Oragono included) always sends an authoritative form of the name, which should be consistent unless the client manually changes it. So there should not be a pressing need to compare identifiers in a case-insensitive manner on the client side. Rather, channel names will always be byte-for-byte identical in server output (barring the draft RENAME extension, which I believe is not widely implemented). For nicknames, users can change case with NICK, but this is not conceptually distinct from changing to a completely different nickname and expecting clients to keep track of user identity across nickname changes.

Thoughts?

@kylef
Copy link
Member Author

kylef commented Jul 20, 2020

We've seen cases where this hasn't been true, although I do not recall the details (it was some years ago). This may be a specific IRCd and not widespread.

When it comes to bouncers like ZNC which also has its own sense of normalisation which might differ, I think there could be cases where you'd see different cases for nicks depending on origin. Perhaps none that affect this feature though. I am able to reproduce inconsistencies such as echo-message replaying the clients case (which is different to upstream server).

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

No branches or pull requests

2 participants