Disable notification triggers on group messages.

This commit is contained in:
Mikunj 2019-09-10 15:37:26 +10:00
parent c738f810b5
commit a683c3fa90
2 changed files with 7 additions and 1 deletions

View File

@ -988,7 +988,8 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
// Loki - Map message id to server id
updatePublicChatMessageWithServerID(messageServerIDOrNull, insertResult);
if (threadId != null) {
boolean isGroupMessage = message.getGroupInfo().isPresent();
if (threadId != null && !isGroupMessage) {
MessageNotifier.updateNotification(context, threadId);
}
}

View File

@ -388,6 +388,11 @@ public class MessageNotifier {
}
private static void sendInThreadNotification(Context context, Recipient recipient) {
// Keep group messages muted!
if (recipient.isGroupRecipient()) {
return;
}
if (!TextSecurePreferences.isInThreadNotifications(context) ||
ServiceUtil.getAudioManager(context).getRingerMode() != AudioManager.RINGER_MODE_NORMAL)
{