mirror of
https://github.com/JJTech0130/pypush.git
synced 2025-01-23 03:38:52 +00:00
Merge pull request #30 from Kasherpete/sms-registration
This commit is contained in:
commit
a10b16990e
@ -20,10 +20,12 @@ def register(push_token: bytes, no_parse = False, gateway = None) -> tuple[str,
|
|||||||
print("MCC+MNC received! " + mccmnc)
|
print("MCC+MNC received! " + mccmnc)
|
||||||
print("Determining gateway...")
|
print("Determining gateway...")
|
||||||
gateway = gateway_fetch.getGatewayMCCMNC(mccmnc)
|
gateway = gateway_fetch.getGatewayMCCMNC(mccmnc)
|
||||||
print("Gateway found! " + gateway)
|
if gateway is not None:
|
||||||
if gateway is None:
|
print("Gateway found! " + str(gateway))
|
||||||
print("Automatic gateway detection failed, switching to default...")
|
else:
|
||||||
gateway = GATEWAY
|
print("No gateway was provided, and automatic gateway detection failed. Please run again with the --gateway flag.")
|
||||||
|
# gateway = GATEWAY
|
||||||
|
raise
|
||||||
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 New Issue
Block a user