mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 19:32:29 -06:00
Use walrus operator for ease of reading
This commit is contained in:
parent
c9664c1ce1
commit
4baff08ce5
1 changed files with 1 additions and 2 deletions
|
@ -95,8 +95,7 @@ class APNSProxy:
|
|||
def tamper_lookup_keys(self, payload: apns.APNSPayload) -> apns.APNSPayload:
|
||||
if payload.id == 0xA: # Notification
|
||||
if payload.fields_with_id(2)[0].value == sha1(b"com.apple.madrid").digest(): # Topic
|
||||
if payload.fields_with_id(3)[0].value is not None: # Body
|
||||
body = payload.fields_with_id(3)[0].value
|
||||
if body := payload.fields_with_id(3)[0].value is not None:
|
||||
body = plistlib.loads(body)
|
||||
if body['c'] == 97: # Lookup response
|
||||
resp = gzip.decompress(body["b"]) # HTTP body
|
||||
|
|
Loading…
Reference in a new issue