Merge pull request #67 from paul-nameless/fix-notify

fix notify
This commit is contained in:
Nameless 2020-06-03 14:31:21 +08:00 committed by GitHub
commit bedccb9eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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