diff --git a/sms_registration.py b/sms_registration.py index c11f7c9..929dcdd 100644 --- a/sms_registration.py +++ b/sms_registration.py @@ -11,8 +11,10 @@ PHONE_IP = "192.168.5.120" API_PORT = 8080 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""" + if gateway is None: + gateway = GATEWAY token = push_token.hex().upper() req_id = random.randint(0, 2**32) sms = f"REG-REQ?v=3;t={token};r={req_id};"