Merge pull request #334 from RyanRory/group-chat-mark-as-read

Fix Group Chats Not Being Marked as Read Bug
This commit is contained in:
Niels Andriesse 2020-09-11 12:04:38 +10:00 committed by GitHub
commit fe0d382a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,9 +222,9 @@ public class DefaultMessageNotifier implements MessageNotifier {
Recipient recipients = DatabaseFactory.getThreadDatabase(context) Recipient recipients = DatabaseFactory.getThreadDatabase(context)
.getRecipientForThreadId(threadId); .getRecipientForThreadId(threadId);
if (isVisible && recipients != null && SessionMetaProtocol.shouldSendReadReceipt(recipients.getAddress())) { if (isVisible && recipients != null) {
List<MarkedMessageInfo> messageIds = threads.setRead(threadId, false); List<MarkedMessageInfo> messageIds = threads.setRead(threadId, false);
MarkReadReceiver.process(context, messageIds); if (SessionMetaProtocol.shouldSendReadReceipt(recipients.getAddress())) { MarkReadReceiver.process(context, messageIds); }
} }
if (!TextSecurePreferences.isNotificationsEnabled(context) || if (!TextSecurePreferences.isNotificationsEnabled(context) ||