Only send PNs to chats that are unmuted (#3673)

This commit is contained in:
Ibrahem Khalil 2023-06-27 18:19:21 +03:00 committed by GitHub
parent afb9621f01
commit fc353d5dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -5850,6 +5850,7 @@ func (m *Messenger) pushNotificationOptions() *pushnotificationclient.Registrati
m.allChats.Range(func(chatID string, chat *Chat) (shouldContinue bool) {
if chat.Muted {
mutedChatIDs = append(mutedChatIDs, chat.ID)
return true
}
if chat.Active && (chat.Public() || chat.CommunityChat()) {
publicChatIDs = append(publicChatIDs, chat.ID)