This project is archived. Its data is read-only.

Decouple unread item count from emails

Created by: NaterGator

Since April 6th, Gitter has been sending me email updates for all missed messages despite my settings in the respective rooms being for Announcements.

I have tried changing to All and then back to Announcements but that did not work.

Cause/why?

Getting unread emails when your notifications are set to All or Announcements is as expected but we realize isn't desired. Both of those settings have Show unread item counts in the description which means we track unreads. Currently, tracking unreads is tied to the unread emails that get sent out.

-- @MadLittleMods, https://gitlab.com/gitlab-org/gitter/webapp/-/issues/1205#note_38207528

Solution notes

Fixing the email service (decouple)

When using the Announcements setting, stop our email service from sending emails for normal messages.

This would be most ideal but might be harder to figure out and fix.

Remove unread item count tracking from the Announcements notification setting

The Announcements setting should only track @all announcements and mentions. Currently it tracks all unread messages which causes the unwanted emails down the line

Re-arranging our current notification settings

Here is an alternative proposal as a first iteration to improving notifications:

  • Remove the existing Announcements setting
  • Rename the existing Mute setting to Mentions
  • Migrate everyone who had Announcements to the new Mentions

What do we lose?

People who use Mentions won't get @/all notifications. I think it would be best to track @/all announcement functionality as a separate toggle when you use Mentions. Some people will want it on and some people won't so I'd rather not make a decision to default it one way or the other. This is more work and a bit unknown though so we should track this iteration separately.

People who used Announcements and already unsubscribed from all emails will lose the unread item counts in the left-menu.

What do we gain?

The announcement settings do what they say. We already better clarified what the notification settings do in the modal but that doesn't mean that is what people want. Here is how the new notification setting simplification breaks down:

  • All -> Creates notifications and emails for all messages sent in the room
  • Mentions -> Creates notifications and emails for any mentions of your user in the room

-- @MadLittleMods, https://gitlab.com/gitlab-org/gitter/webapp/-/issues/1205#note_357566358

Relevant code

  • https://gitlab.com/gitlab-org/gitter/webapp/tree/157e8a0bee4ba121bb83c8848e443c93ae6271ff/server/services/unread-items
  • https://gitlab.com/gitlab-org/gitter/webapp/tree/157e8a0bee4ba121bb83c8848e443c93ae6271ff/server/services/unread-items/redis-lua
  • https://gitlab.com/gitlab-org/gitter/webapp/-/blob/a34e6bbca046f3817e621e136cdb1192c4442142/modules/rooms/lib/room-membership-flags.js
Edited Oct 01, 2020 by Eric Eastwood
Assignee Loading
Time tracking Loading