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

Case-insensitive topics in unreads data #980

Open
gnprice opened this issue Oct 3, 2024 · 3 comments · May be fixed by #1214
Open

Case-insensitive topics in unreads data #980

gnprice opened this issue Oct 3, 2024 · 3 comments · May be fixed by #1214
Labels
a-model Implementing our data model (PerAccountStore, etc.) help wanted
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Oct 3, 2024

Topic names in Zulip are case-insensitive.

Currently, however, our Unreads data structure keeps the data for each channel/stream as just a Map keyed by topic name. It should instead treat messages where the topic names differ only in case (and that have the same stream ID) as belonging to the same topic.

There's actually a server bug where this doesn't properly happen in the unreads data we get in the initial snapshot:
https://chat.zulip.org/#narrow/stream/48-mobile/topic/Case.20sensitivity.20in.20topics/near/1954334
But we should also handle this properly in events, and in looking up data. For example handleMessageEvent should put the new message into an existing topic if it differs only in case.

If fixing this issue for events has a side effect of working around the server-side issue, then that's nice. But if it doesn't, we don't need to add a workaround. The issue seems fairly uncommon, so it's OK if the symptoms continue when using a server that still has the bug.

Related issues

@gnprice gnprice added the a-model Implementing our data model (PerAccountStore, etc.) label Oct 3, 2024
@gnprice gnprice added this to the Launch milestone Oct 3, 2024
@Adityakk9031
Copy link

i am going to work on this issue

@chrisbobbe
Copy link
Collaborator

@Adityakk9031
Copy link

ok

Adityakk9031 added a commit to Adityakk9031/zulip-flutter that referenced this issue Nov 24, 2024
apoorvapendse added a commit to apoorvapendse/zulip-flutter that referenced this issue Dec 27, 2024
This commit makes the topics having different
casings for the same topic be stored under
the same QueueList by making the lookups
lowercase while preserving one of the
variants of the used topic case.

Fixes zulip#980.
apoorvapendse added a commit to apoorvapendse/zulip-flutter that referenced this issue Dec 27, 2024
This commit makes the topics having different
casings for the same topic be stored under
the same QueueList by making the lookups
lowercase while preserving one of the
variants of the used topic case.

Fixes zulip#980.
@apoorvapendse apoorvapendse linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-model Implementing our data model (PerAccountStore, etc.) help wanted
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants