mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
zilencer: Tie RemotePushDeviceToken to RemoteRealm at registration.
This consists of the following pieces:
1. Makes servers using the bouncer send realm_uuid in requests for token
registration. (Sidenote: realm_uuid is already sent in the "send
notification" codepath as of
48db4bf854
)
2. This allows the bouncer to tie RemotePushDeviceToken to the
RemoteRealm with matching realm_uuid at registration time.
3. Introduce handling of some potential weird edge cases around the
realm_uuid and RemoteRealm objects in get_remote_realm_helper.
This commit is contained in:
committed by
Tim Abbott
parent
c9b0602320
commit
7f33d6f0ea
@@ -80,6 +80,8 @@ class RemotePushDeviceToken(AbstractPushDeviceToken):
|
||||
user_id = models.BigIntegerField(null=True)
|
||||
user_uuid = models.UUIDField(null=True)
|
||||
|
||||
remote_realm = models.ForeignKey("RemoteRealm", on_delete=models.SET_NULL, null=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = [
|
||||
# These indexes rely on the property that in Postgres,
|
||||
|
Reference in New Issue
Block a user