Files
zulip/zerver/lib/push_notifications.py
Greg Price aaeabeda44 notifications: Dedupe APNs tokens case-insensitively.
Fixes zulip/zulip-flutter#1617.

It turns out that an APNs token (which is a hex string) is equally
valid in lower or upper case.  The old app would send the server
the lower-case form of the token, but the new app sends the
upper-case form.

Because we've been treating tokens case-sensitively, if the user
upgrades from the old app to the new, that results in the server
and bouncer each having two copies of the token (one lower-case and
one upper-case), and therefore sending that device two copies of
each notification: zulip/zulip-flutter#1617.

To fix that immediately, have the bouncer drop duplicate tokens
before sending the notifications to APNs.

Work is also in progress on fixing this in a better-structured way,
by having the database correctly treat tokens as the same when they
differ only in case.
2025-07-10 10:54:14 -07:00

59 KiB