diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 0cb42e94..74a7e8dc 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # This file is part of Tautulli. # @@ -3365,6 +3365,7 @@ class TELEGRAM(Notifier): _DEFAULT_CONFIG = {'bot_token': '', 'chat_id': '', 'disable_web_preview': 0, + 'silent_message': 0, 'html_support': 1, 'incl_subject': 1, 'incl_poster': 0 @@ -3410,6 +3411,9 @@ class TELEGRAM(Notifier): data['text'] = (text[:4093] + (text[4093:] and '...')).encode('utf-8') + if self.config['silent_message']: + data['disable_notification'] = True + if self.config['disable_web_preview']: data['disable_web_page_preview'] = True @@ -3460,6 +3464,12 @@ class TELEGRAM(Notifier): 'name': 'telegram_disable_web_preview', 'description': 'Disables automatic link previews for links in the message', 'input_type': 'checkbox' + }, + {'label': 'Enable Silent Messages', + 'value': self.config['silent_message'], + 'name': 'telegram_silent_message', + 'description': 'Sends the message silently. Users will receive a notification with no sound.', + 'input_type': 'checkbox' } ]