Skip to content

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

Closed
@chrisbobbe

Description

@chrisbobbe

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

Metadata

Metadata

Assignees

Labels

a-AndroidIssues specific to Android, or requiring Android-specific worka-notifications

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions