Add group chat messages to notifications

This commit is contained in:
Andrea Maria Piana 2021-03-15 15:40:17 +01:00
parent e29cca667a
commit 387eed5c16
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
2 changed files with 5 additions and 1 deletions

View File

@ -108,6 +108,10 @@ func (c *Chat) OneToOne() bool {
return c.ChatType == ChatTypeOneToOne
}
func (c *Chat) PrivateGroupChat() bool {
return c.ChatType == ChatTypePrivateGroupChat
}
func (c *Chat) CommunityChatID() string {
if c.ChatType != ChatTypeCommunityChat {
return c.ID

View File

@ -3023,7 +3023,7 @@ func (m *Messenger) handleRetrievedMessages(chatWithMessages map[transport.Filte
}
func showNotification(publicKey ecdsa.PublicKey, n MessageNotificationBody, responseTo *common.Message) bool {
if n.Chat != nil && n.Chat.ChatType == ChatTypeOneToOne {
if n.Chat != nil && (n.Chat.OneToOne() || n.Chat.PrivateGroupChat()) {
return true
}