zerver: Add endpoint to register a push device to server.

This commit adds an endpoint to register a push device
to receive E2EE push notifications.
This commit is contained in:
Prakhar Pratyush
2025-06-02 22:03:06 +05:30
committed by Tim Abbott
parent c846302417
commit 5f8edf669d
17 changed files with 711 additions and 11 deletions

View File

@@ -101,6 +101,9 @@ class PushDevice(AbstractPushDevice):
# generated by the client to register. But the API treats
# that as idempotent request.
# We treat (user, push_account_id) as a unique registration.
#
# Also, the unique index created is used by queries in `get_push_accounts`,
# `register_push_device`, and `handle_register_push_device_to_bouncer`.
fields=["user", "push_account_id"],
name="unique_push_device_user_push_account_id",
),