Add test for notification settings
This commit is contained in:
@@ -133,9 +133,9 @@ class Telegram(RPC):
|
||||
""" Send a message to telegram channel """
|
||||
|
||||
noti = self._config['telegram'].get('notification_settings', {}
|
||||
).get(msg['type'].value, 'on')
|
||||
).get(msg['type'], 'on')
|
||||
if noti == 'off':
|
||||
logger.info(f"Notification {msg['type']} not sent.")
|
||||
logger.info(f"Notification '{msg['type']}' not sent.")
|
||||
# Notification disabled
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user