christianselig/apollo-backend

"Mute all notifications" endpoint

Closed this issue · 1 comments

Would be great to have an "all muted" endpoint for a specific account in addition to the current "separate" toggles for inbox and watchers.

The reason is (copied from our discussion):

Also on a scale of 1-10, how hard would it be to have a separate “all muted” flag for an account on the server? Basically right now we have the flag for inbox and a flag for watchers, but if a user has inbox OFF and watchers ON, and they hit “mute everything”, I basically would have to flip both to off. The issue is when they “unmute all” I want to leave inbox still off, and there’s no way for me to know that without storing a potentially error prone flag client side (kinda violating my ‘server is one source of truth’ edict)

Fixed in 5f65987

The same endpoint that lets you set inbox_notifications and watcher_notifications now also accepts a global_mute property. So, the body looks like:

{
    "inbox_notifications": false,
    "watcher_notifications": true,
    "global_mute": false
}