Skip to content

WIP: Remember push notification category preferences when a device already exists

Gijs Hendriksen requested to merge fix/keep-push-notification-categories into master

Previous behaviour

Whenever a device tried to register after having already registered once before, all push notifications are enabled, no matter what the previous preferences were.

Steps to reproduce:

  1. Open the app on your phone.
  2. Notice a new Device is created which contains your phone's push notification preferences.
  3. Disable a few push notification categories.
  4. Close the app and reopen it (upon which your devices tries to register again).
  5. Notice all push notification categories are enabled.

New behaviour

When a device has already registered before, the next time it registers only the relevant fields will be updated, i.e. fields that are either in the body or implicitly transferred in the request (user, language).

Steps to validate that it works:

  1. Open the app on your phone.
  2. Notice a new Device is created which contains your phone's push notification preferences.
  3. Disable a few push notification categories.
  4. Close the app and reopen it (upon which your devices tries to register again).
  5. Notice the specific categories are still disabled.
Edited by Sébastiaan Versteeg

Merge request reports