Create generalized API for requesting periodic push notifications #2527
Labels
App:Backend
App:Frontend
Kind:Core
Anything that changes or affects the fundamental core data structures & design of the application.
Kind:Enhancement
Improvements, new features, performance upgrades, etc.
Priority:High
Problem
This code needs to only run for requested push subscriptions:
Solution
Implement it in a generic way so that apps can specify when registering push notifications that the server periodically send these to them.
Note: there should be a minimum request period that you can't go below, e.g. no app should be able to request periodic notifications more frequently than say every 5 minutes. In other words, the server should enforce this limit, and return an error to clients that want more frequent notifications. The error message should include the server's configured minimum time, so that if some server say wants it to be every 30 minutes, apps can figure out and adjust to this new minimum time as needed. There could also be a new RESTful GET API (e.g.
/config
) that returns the server's configuration values such as minimum notification time. Alternatively, the server can doMath.max(requestedTime, SERVER_MIN_PERIODIC_TIME)
, with some sort of warning returned (this way is probably simpler and better..).The text was updated successfully, but these errors were encountered: