mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-31 12:00:08 -07:00
Renamed 'silent_message' to 'silent_notification.'
Signed-off-by: Gianfranco <gianfry94@hotmail.it>
This commit is contained in:
parent
f07bcca96a
commit
721cf5c930
1 changed files with 5 additions and 5 deletions
|
@ -3365,7 +3365,7 @@ class TELEGRAM(Notifier):
|
||||||
_DEFAULT_CONFIG = {'bot_token': '',
|
_DEFAULT_CONFIG = {'bot_token': '',
|
||||||
'chat_id': '',
|
'chat_id': '',
|
||||||
'disable_web_preview': 0,
|
'disable_web_preview': 0,
|
||||||
'silent_message': 0,
|
'silent_notification': 0,
|
||||||
'html_support': 1,
|
'html_support': 1,
|
||||||
'incl_subject': 1,
|
'incl_subject': 1,
|
||||||
'incl_poster': 0
|
'incl_poster': 0
|
||||||
|
@ -3407,7 +3407,7 @@ class TELEGRAM(Notifier):
|
||||||
data.pop('disable_notification') #This prevents from alerting with 2 sounds Telegram when the Silent Message is OFF: one alert for the photo and the second one for the text
|
data.pop('disable_notification') #This prevents from alerting with 2 sounds Telegram when the Silent Message is OFF: one alert for the photo and the second one for the text
|
||||||
else:
|
else:
|
||||||
data['caption'] = text.encode('utf-8')
|
data['caption'] = text.encode('utf-8')
|
||||||
if self.config['silent_message']:
|
if self.config['silent_notification']:
|
||||||
data['disable_notification'] = True
|
data['disable_notification'] = True
|
||||||
self.make_request('https://api.telegram.org/bot{}/sendPhoto'.format(self.config['bot_token']),
|
self.make_request('https://api.telegram.org/bot{}/sendPhoto'.format(self.config['bot_token']),
|
||||||
data=data, files=files)
|
data=data, files=files)
|
||||||
|
@ -3418,7 +3418,7 @@ class TELEGRAM(Notifier):
|
||||||
if self.config['disable_web_preview']:
|
if self.config['disable_web_preview']:
|
||||||
data['disable_web_page_preview'] = True
|
data['disable_web_page_preview'] = True
|
||||||
|
|
||||||
if self.config['silent_message']:
|
if self.config['silent_notification']:
|
||||||
data['disable_notification'] = True
|
data['disable_notification'] = True
|
||||||
|
|
||||||
headers = {'Content-type': 'application/x-www-form-urlencoded'}
|
headers = {'Content-type': 'application/x-www-form-urlencoded'}
|
||||||
|
@ -3470,8 +3470,8 @@ class TELEGRAM(Notifier):
|
||||||
'input_type': 'checkbox'
|
'input_type': 'checkbox'
|
||||||
},
|
},
|
||||||
{'label': 'Enable Silent Notifications',
|
{'label': 'Enable Silent Notifications',
|
||||||
'value': self.config['silent_message'],
|
'value': self.config['silent_notification'],
|
||||||
'name': 'telegram_silent_message',
|
'name': 'telegram_silent_notification',
|
||||||
'description': 'Send notifications silently without any alert sounds.',
|
'description': 'Send notifications silently without any alert sounds.',
|
||||||
'input_type': 'checkbox'
|
'input_type': 'checkbox'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue