Update sms_registration.py

This commit is contained in:
Kasherpete 2023-09-23 22:42:37 -05:00 committed by GitHub
parent 207c33a6f4
commit 48f537d991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,9 @@ def register(push_token: bytes, no_parse = False, gateway = None) -> tuple[str,
if gateway is not None:
print("Gateway found! " + str(gateway))
else:
print("Automatic gateway detection failed, switching to default...")
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()
req_id = random.randint(0, 2**32)
sms = f"REG-REQ?v=3;t={token};r={req_id};"