diff --git a/example_configs/notification_config b/example_configs/notification_config index 3770d4a..f96ac5a 100644 --- a/example_configs/notification_config +++ b/example_configs/notification_config @@ -23,3 +23,5 @@ enabled = false url = url topic = topic +token = token + diff --git a/src/ReVancedBuilder/Notifications.py b/src/ReVancedBuilder/Notifications.py index 28ebc8b..170ee45 100644 --- a/src/ReVancedBuilder/Notifications.py +++ b/src/ReVancedBuilder/Notifications.py @@ -55,6 +55,11 @@ def send_notif(appstate, error=False): continue headers = {'Icon': 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Revanced-logo-round.svg/240px-Revanced-logo-round.svg.png', 'Title': encoded_title} + try: + token = config[entry]['token'] + headers['Authorization'] = 'Bearer' + token + except: + continue try: req.post(f"{url}/{topic}", msg, headers=headers) except Exception as e: