From 1aabd4e221374df936f4ec5d0775ba540190d258 Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Sat, 2 Sep 2023 19:48:10 -0400 Subject: [PATCH] bug --- sms_registration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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};"