Dont show notification from inactive chats

This commit is contained in:
Andrea Maria Piana 2021-04-21 13:46:53 +02:00
parent 9241903edb
commit 3e80b1ecaa
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ type NotificationBody struct {
}
func showMessageNotification(publicKey ecdsa.PublicKey, message *common.Message, chat *Chat, responseTo *common.Message) bool {
if chat != nil && !chat.Active {
return false
}
if chat != nil && (chat.OneToOne() || chat.PrivateGroupChat()) {
return true
}