mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
bug
This commit is contained in:
parent
91f9d7900e
commit
1aabd4e221
1 changed files with 3 additions and 1 deletions
|
@ -11,8 +11,10 @@ PHONE_IP = "192.168.5.120"
|
||||||
API_PORT = 8080
|
API_PORT = 8080
|
||||||
GATEWAY = "22223333"
|
GATEWAY = "22223333"
|
||||||
|
|
||||||
def register(push_token: bytes, no_parse = False, gateway = GATEWAY) -> tuple[str, bytes]:
|
def register(push_token: bytes, no_parse = False, gateway = None) -> tuple[str, bytes]:
|
||||||
"""Forwards a registration request to the phone and returns the phone number, signature for the provided push token"""
|
"""Forwards a registration request to the phone and returns the phone number, signature for the provided push token"""
|
||||||
|
if gateway is None:
|
||||||
|
gateway = GATEWAY
|
||||||
token = push_token.hex().upper()
|
token = push_token.hex().upper()
|
||||||
req_id = random.randint(0, 2**32)
|
req_id = random.randint(0, 2**32)
|
||||||
sms = f"REG-REQ?v=3;t={token};r={req_id};"
|
sms = f"REG-REQ?v=3;t={token};r={req_id};"
|
||||||
|
|
Loading…
Reference in a new issue