Merge pull request #5049 from kamontat/patch-1

Fix we use check sell_noti not noti
This commit is contained in:
Matthias 2021-05-30 15:19:27 +01:00 committed by GitHub
commit 4ac3e2978b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,8 +240,8 @@ class Telegram(RPCHandler):
if msg_type == RPCMessageType.SELL:
sell_noti = self._config['telegram'] \
.get('notification_settings', {}).get(str(msg_type), {})
# For backward compatibility sell still be string
if isinstance(noti, str):
# For backward compatibility sell still can be string
if isinstance(sell_noti, str):
noti = sell_noti
else:
noti = sell_noti.get(str(msg['sell_reason']), default_noti)