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

Notifications and read/unread messages should sync between devices #750

Open
holmesworcester opened this issue Jul 29, 2022 · 6 comments
Open
Assignees

Comments

@holmesworcester
Copy link
Contributor

holmesworcester commented Jul 29, 2022

Messaging apps have quite a lot of features that users take for granted, when it comes to syncing read/unread messages, notifications, and notification settings between platforms.

Requirements

  • Each app has a master notification shutoff. If users want to globally turn off all notifications in one particular desktop or mobile app, they can always do this.
  • All notification settings sync across devices. Some apps offer flexibility, but the best starting point is to sync all notification settings across all user devices. This should not override a particular app's master shutoff, but everything else should sync across all of a user's devices, e.g. muting channels, muting users, or notifications for mentions and DMs only. This is the behavior in WhatsApp, Signal, and Telegram, and it is the most familiar behavior.
  • Read/unread should sync across devices. Several features, e.g. the channel unread count, or awareness of late-arriving messages (UX for late-arriving messages #779) depend on messages being read or unread. It is important for this information to sync across a user's devices, otherwise the resulting unread information is useless, since it will mostly be false positives, alerting the user to unread messages that they have in fact already read.
  • Read messages should not result in notifications. If you've been using the app on your phone and start the desktop app for the first time in weeks, you should not get a deluge of notifications.
  • Suppress notifications across all devices when one device is "active". When you are actively using Quiet on one of your devices, it would be annoying to receive notifications. WhatsApp, Signal, and Telegram silence notifications on all a user's devices in this case. Activity detection varies by platform, but on desktop it is based both on whether the app window is selected and recently-used. On mobile it may simply be that the app is in the foreground. This feature might be a secondary consequence of tracking and suppressing notifications for messages that have been read, but I think it is based on a boolean of "is app active."

Implications for how notification settings are stored:

  • We must store a user's read/unread information and notification settings in the community state, so that all of their devices can sync it efficiently.
  • We don't need to store it forever, and shouldn't.
  • We should encrypt the information so that only the user's devices can access it. For example, Bob should not be able to tell if Alice has muted him.

Implications for iOS push notifications:

  • iOS clients must sync all notification settings updates when receiving a push notification, before choosing whether to display it. Otherwise, they will show notifications the user has turned off, which will be annoying.
  • An iOS app should ideally be able to silence notifications when the user is active in another app, otherwise they will receive unwanted notifications, which will be annoying. This will require permission from Apple.
  • An alternative approach would be to let users to share a "can silence" token with their other devices, so that those devices can tell the push notification service to suppress notifications to their iOS devices whenever they are active.

See below for more research and discussion.

@jgaylor jgaylor assigned holmesworcester and unassigned jgaylor Aug 5, 2022
@holmesworcester holmesworcester moved this to Backlog - Desktop & Backend in Quiet Apr 5, 2023
@holmesworcester
Copy link
Contributor Author

holmesworcester commented Jan 19, 2024

Questions:

  • what does signal or whatsapp do?
  • what does slack do?
  • discord?
  • how do explicit notification controls work? can they be separate?
  • do channel-specific mutes sync across both? (probably yes!)
  • does the channel highlight on new messages go away on desktop when you view the channel on mobile?
  • what about the dock? or "new threads"?
  • where else are we displaying new vs. unread?
  • do phone notifications get muted when desktop app is running but in the background?
  • how does muting interact with badges
  • how does it interact with a telegram-style unread counter: https://www.figma.com/file/MVmy9OPUkP2E7Bl4v9lTVA/Receive-new-(but-old)-messages?type=design&node-id=7-2510&mode=design&t=vjW22lV9qW1o9RP4-0 (does reading on mobile make the unread on desktop go away? i think so?)

Goals:

  • things should be in sync
  • user might need control of some things
  • user should not get notifications that don't make sense e.g. notifs on their phone when the desktop app is open in the foreground.

@holmesworcester
Copy link
Contributor Author

Notes on Whatsapp research:

  • When desktop app is in foreground (there might be an activity timer here so that it can't also be idle, but i'm not sure yet) it mutes phone notifications and desktop notifications
  • When desktop app is open but not in foreground, desktop and phone notifications work as normal
  • When mobile app in foreground mobile and desktop notifications are muted

@jgaylor
Copy link
Collaborator

jgaylor commented Jan 19, 2024

I realized after doing some research that we already added notifications to community settings, Channel settings, and DM settings. The options are currently as follows:

Get notifications for:

  • All messages
  • Only for @mentions and DMs
  • Off

This allows global and local (channel/DM) controls. We also have promos that will tell you to enable your device notifications if they are not enabled.

Unless we want to add more controls, I’m not sure this needs any design.

The synchronization strategy is up to Holmes and the Engineers. The goal is to sync, keeping track of the last-read message per user across all devices, and making sure to update devices accordingly.

We also need some sort of ‘presence detection’ to determine if the user is actively using the desktop so we can mute mobile notifications. If the user has been active on mobile, and then switches to desktop (and vice versa), we should delay notifications for a short period to allow for synchronizing. Delay time TBD in experiments, but likely 2-5 seconds is good.

@jgaylor
Copy link
Collaborator

jgaylor commented Jan 19, 2024

Some answers from the research:

do channel-specific mutes sync across both? (probably yes!)

Yes, based on telegram research.

how does muting interact with badges

Badges should continue to be shown, unless we add a controls for that.

how does it interact with a telegram-style unread counter: https://www.figma.com/file/MVmy9OPUkP2E7Bl4v9lTVA/Receive-new-(but-old)-messages?type=design&node-id=7-2510&mode=design&t=vjW22lV9qW1o9RP4-0 (does reading on mobile make the unread on desktop go away? i think so?)

Yes, based on telegram research

I also found out in my telegram research we can detect if user has notifications turned off on MacOS and prompt them to turn them on. I added a note to the previous spec where we we're previously unsure.

@jgaylor
Copy link
Collaborator

jgaylor commented Jan 19, 2024

Some other notes from our call:

  • Each platform has master shutoff switch
  • Everything else should sync for now until we add more device specific controls. For example if I'm in the app and I change the notification settting to 'Get notified only for @mentions and DMs'. Then that should apply to all platforms.

@holmesworcester
Copy link
Contributor Author

Updated the issue description to reflect all of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog - Desktop & Backend
Development

No branches or pull requests

2 participants