Fix notification: do not notify if char archived and muted

This commit is contained in:
Paul Nameless 2020-06-03 09:37:24 +08:00
parent 3ad084f3db
commit 66271218b2

View file

@ -499,9 +499,12 @@ class Controller:
for chat in self.model.chats.chats:
if chat_id == chat["id"]:
break
else:
# chat not found, do not notify
return
# TODO: handle cases when all chats muted on global level
if chat and chat["notification_settings"]["mute_for"]:
if chat["notification_settings"]["mute_for"]:
return
# notify