push_notifications: Support test notifications from old servers.

4430ab9cbe changed this, assuming that all servers would send
`realm_url` -- however, only servers running that commit do.  Update
to accept either `realm_url` or `realm_uri` payload properties.
This commit is contained in:
Alex Vandiver 2024-06-05 05:26:05 +00:00 committed by Tim Abbott
parent 94627196df
commit 46a57e37aa
1 changed files with 2 additions and 1 deletions

View File

@ -1449,7 +1449,8 @@ def send_test_push_notification_directly_to_devices(
apple_payload = copy.deepcopy(payload)
android_payload = copy.deepcopy(payload)
realm_url = base_payload["realm_url"]
# TODO/compatibility: Backwards-compatibility name for realm_url.
realm_url = base_payload.get("realm_url", base_payload["realm_uri"])
realm_name = base_payload["realm_name"]
apns_data = {
"alert": {