When a device's unconsumed one-time prekey count drops below a threshold (e.g. 20), include oneTimePreKeysRemaining in GET /devices response and emit a prekeys_low WebSocket event to the device's active sockets after a bundle fetch. Debounce to at most once per threshold crossing.
Acceptance criteria:
prekeys_low emitted at most once per threshold crossing (debounced)
oneTimePreKeysRemaining accurate in GET /devices
- After replenishment, the signal stops firing
When a device's unconsumed one-time prekey count drops below a threshold (e.g. 20), include
oneTimePreKeysRemaininginGET /devicesresponse and emit aprekeys_lowWebSocket event to the device's active sockets after a bundle fetch. Debounce to at most once per threshold crossing.Acceptance criteria:
prekeys_lowemitted at most once per threshold crossing (debounced)oneTimePreKeysRemainingaccurate inGET /devices