mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -06:00
Iterate over references instead of indexes for identities
This commit is contained in:
parent
855390ec43
commit
04969a0160
1 changed files with 3 additions and 3 deletions
|
@ -103,9 +103,9 @@ class APNSProxy:
|
||||||
|
|
||||||
# Replace public keys
|
# Replace public keys
|
||||||
for r in resp["results"].keys():
|
for r in resp["results"].keys():
|
||||||
for i in range(len(resp["results"][r]["identities"])):
|
for identity in resp["results"][r]["identities"]:
|
||||||
if "client-data" in resp["results"][r]["identities"][i]:
|
if "client-data" in identity:
|
||||||
resp["results"][r]["identities"][i]["client-data"]["public-message-identity-key"] = b"REDACTED"
|
identity["client-data"]["public-message-identity-key"] = b"REDACTED"
|
||||||
|
|
||||||
resp = gzip.compress(plistlib.dumps(resp, fmt=plistlib.FMT_BINARY), mtime=0)
|
resp = gzip.compress(plistlib.dumps(resp, fmt=plistlib.FMT_BINARY), mtime=0)
|
||||||
body["b"] = resp
|
body["b"] = resp
|
||||||
|
|
Loading…
Reference in a new issue