forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recipient: Use IDs in isSameRecipient; cut out normalizeRecipients!
The hairy logic in normalizeRecipients was one of the last few cases of the confusion around PM recipients we're seeking to remove for zulip#4035. It also represents one of the many places we're in the process of converting from using emails to using numeric user IDs. The case where this could potentially change behavior is where we have several messages that are in the same PM conversation, but the `display_recipient` property on different messages disagrees about the email of some participant (e.g. because that user changed their email between when we learned about one message and when we learned about the other.) The old code would fail to notice the messages were in the same conversation, and so when showing them consecutively in an interleaved narrow (like all-messages or a search result), we'd show a new recipient bar between them. With this fix, we correctly identify the messages as belonging to the same conversation.
- Loading branch information
Showing
2 changed files
with
4 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters