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

android: Notification grouping should treat topics case-insensitively #1205

Open
chrisbobbe opened this issue Dec 26, 2024 · 1 comment
Open
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-notifications
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented Dec 26, 2024

We use Android's "inbox style" notifications (this was #128 / PR #718) to group notifications by conversation.

For channel messages, this means grouping messages by topic. Topics in Zulip are meant to be case-insensitive, so we should ignore case for that grouping. For example, messages with the topic "move to Zulip" or the topic "move to zulip" should all be grouped together.1

Other issues where we should be treating topics case-insensitively but we're not:

See our notification-display code for getting a message's "conversation key". It just takes the topic literally without normalizing it by case:

  static String _conversationKey(MessageFcmMessage data, String groupKey) {
    final conversation = switch (data.recipient) {
      FcmMessageChannelRecipient(:var streamId, :var topic) => 'stream:$streamId:$topic',
      FcmMessageDmRecipient(:var allRecipientIds) => 'dm:${allRecipientIds.join(',')}',
    };
    return '$groupKey|$conversation';
  }

Footnotes

  1. As they are in the message list in the web app. By using "Copy link to message", you can see that this and this message have those topics that only differ by case. But they both appear in the message list as though they both have topic "move to Zulip". image

@chrisbobbe chrisbobbe added a-Android Issues specific to Android, or requiring Android-specific work a-notifications labels Dec 26, 2024
@chrisbobbe
Copy link
Collaborator Author

See our notification-display code for getting a message's "conversation key". It just takes the topic literally without normalizing it by case:

(I assume the server isn't normalizing it for us.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-notifications
Projects
Status: No status
Development

No branches or pull requests

2 participants