-
Notifications
You must be signed in to change notification settings - Fork 308
Case-insensitive topics in unreads data #980
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
Comments
i am going to work on this issue |
Please take a look at the Zulip project's guide to getting involved with the code: https://zulip.readthedocs.io/en/latest/contributing/contributing.html#your-first-codebase-contribution |
ok |
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.
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.
Maps canoncalized topic names to a variant of the actual topic name. Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. I referred to the FoldDict code in zulip/zulip as @gnprice suggested. Thanks to the folks who wrote it! See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. I referred to the FoldDict code in zulip/zulip as @gnprice suggested. Thanks to the folks who wrote it! See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
Hello @gnprice , |
Well, if it only touches those two files then it definitely isn't ready for review 🙂 — as you've heard before, a PR needs tests. |
This comment has been minimized.
This comment has been minimized.
If you'd like feedback on code, a PR is the most effective way to present it. Do take a look also at the last comment on the previous PR #1214 — some of that feedback also applies to your draft above. |
This issue also applies to |
Topic names in Zulip are case-insensitive.
Currently, however, our
Unreads
data structure keeps the data for each channel/stream as just aMap
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
The text was updated successfully, but these errors were encountered: