Skip to content

Use org name rather than URL for heading of Android notif group #5115

Open
@gnprice

Description

@gnprice

From #4842 (comment) , a followup after #4842 which gave us nice grouped notifications:

The heading for the whole group of notifications for a given Zulip account identifies the account by the org's URL. Probably this should be the org name instead.

There are two subtasks here: gather the information to make the UI choice of what we do want to show here, and then actually do it.

On the UI decision to make:

  • For I guess one comparison: the notifications I get from various Google services have my Google account email there.
  • For more comparisons, it would be good to look at what Discord and Slack do here. Do they do something like the URL of the "server"/workspace (like our org/realm URL)? Or a name chosen by the "server"/workspace admins (like our org name)?

Then on the implementation, here's the bit in our code where we set this:

        setStyle(NotificationCompat.InboxStyle()
            .setSummaryText(realmUri)
        )

So that's straightforward. Trickier will be where to get the org name from.

  • We could have the server start including it in notification payloads. That'd start working promptly for users on Zulip Cloud and other servers regularly updated from Git. We'd fall back to the URL when it's not available.
  • We could have the JS-side code start keeping it in Redux (which we'll want soon for other things anyway), and then read it from the persisted state. This is probably the ideal solution, because this shape of solution avoids denormalizing more and more data into the notification payloads. But it'll require some infrastructural work: to date we have not had any code on the Kotlin / native-Android side reading the state we persist from Redux. That's Read our stored Redux data from Kotlin #5117 .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions