push_notifs: Stop dropping ios_app_id on floor at bouncer.

This missing `REQ` call has meant we just drop this parameter:
even though the remote Zulip server passes it (for all APNs tokens),
we never notice and never store it.  Fix that.
This commit is contained in:
Greg Price 2023-11-06 13:02:06 -08:00 committed by Tim Abbott
parent 9072ddda05
commit 9c2d53bcef
2 changed files with 3 additions and 2 deletions

View File

@ -838,7 +838,8 @@ class PushBouncerNotificationTest(BouncerTestCase):
)
)
self.assert_length(tokens, 1)
self.assertEqual(tokens[0].token, token)
self.assertEqual(tokens[0].kind, kind)
self.assertEqual(tokens[0].ios_app_id, appid.get("appid"))
# User should have tokens for both devices now.
tokens = list(RemotePushDeviceToken.objects.filter(user_uuid=user.uuid, server=server))

View File

@ -162,7 +162,7 @@ def register_remote_push_device(
user_uuid: Optional[str] = REQ(default=None),
token: str = REQ(),
token_kind: int = REQ(json_validator=check_int),
ios_app_id: Optional[str] = None,
ios_app_id: Optional[str] = REQ(default=None),
) -> HttpResponse:
validate_bouncer_token_request(token, token_kind)