mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -06:00
expand the demo to a third topic
This commit is contained in:
parent
cc54c4b79a
commit
27528bf1da
2 changed files with 5 additions and 1 deletions
5
demo.py
5
demo.py
|
@ -156,8 +156,9 @@ def lookup(topic:str, users: list[str]):
|
|||
|
||||
# Hack to make sure that the requests and responses match up
|
||||
# This filter MUST contain all the topics you are looking up
|
||||
conn.filter(['com.apple.madrid', 'com.apple.private.alloy.facetime.multi'])
|
||||
conn.filter(['com.apple.madrid', 'com.apple.private.alloy.facetime.multi', 'com.apple.private.alloy.multiplex1'])
|
||||
import time
|
||||
print("...waiting for queued messages... (this is a hack)")
|
||||
time.sleep(5) # Let the server send us any messages it was holding
|
||||
conn.sink() # Dump the messages
|
||||
|
||||
|
@ -167,6 +168,8 @@ lookup("com.apple.private.alloy.facetime.multi", ["mailto:jjtech@jjtech.dev"])
|
|||
lookup("com.apple.private.alloy.facetime.multi", ["mailto:user_test2@icloud.com"])
|
||||
lookup("com.apple.madrid", ["mailto:user_test2@icloud.com"])
|
||||
|
||||
lookup("com.apple.private.alloy.multiplex1", ["mailto:user_test2@icloud.com"])
|
||||
|
||||
# Save config
|
||||
with open("config.json", "w") as f:
|
||||
json.dump(CONFIG, f, indent=4)
|
|
@ -8,6 +8,7 @@ import tlslite
|
|||
|
||||
# setting path
|
||||
sys.path.append("../")
|
||||
sys.path.append("../../")
|
||||
|
||||
# APNs server to proxy traffic to
|
||||
APNS_HOST = "windows.courier.push.apple.com"
|
||||
|
|
Loading…
Reference in a new issue