Some identity key handling changes

1) Prefetch identity keys when possible

2) Always accept prefetched keys or keys from incoming messages

3) Block sending only if it's a recent change, or if always
   block is enabled

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-05-19 18:01:40 -07:00
parent ca701df1e4
commit d507756821
19 changed files with 476 additions and 248 deletions

View File

@@ -208,6 +208,11 @@ public class MessageNotifier {
if (isVisible) {
List<MarkedMessageInfo> messageIds = threads.setRead(threadId, false);
MarkReadReceiver.process(context, messageIds);
if (recipients != null && recipients.getPrimaryRecipient() != null) {
DatabaseFactory.getIdentityDatabase(context)
.setSeen(recipients.getPrimaryRecipient().getRecipientId());
}
}
if (!TextSecurePreferences.isNotificationsEnabled(context) ||