Respect the 206 paged response from the server group logs endpoint.

Prevent the deduplicate message logic firing and log it if it does.
This commit is contained in:
Alan Evans
2020-10-09 17:45:45 -03:00
parent 07b0d8cf6e
commit 054c705fe2
6 changed files with 206 additions and 11 deletions

View File

@@ -372,6 +372,7 @@ public final class GroupsV2StateProcessor {
Log.d(TAG, "Skipping profile key changes only update message");
} else {
storeMessage(GroupProtoUtil.createDecryptedGroupV2Context(masterKey, new GroupMutation(previousGroupState, entry.getChange(), entry.getGroup()), null), timestamp);
timestamp++;
}
previousGroupState = entry.getGroup();
}
@@ -476,7 +477,9 @@ public final class GroupsV2StateProcessor {
IncomingTextMessage incoming = new IncomingTextMessage(sender, -1, timestamp, timestamp, "", Optional.of(groupId), 0, false);
IncomingGroupUpdateMessage groupMessage = new IncomingGroupUpdateMessage(incoming, decryptedGroupV2Context);
smsDatabase.insertMessageInbox(groupMessage);
if (!smsDatabase.insertMessageInbox(groupMessage).isPresent()) {
Log.w(TAG, "Could not insert update message");
}
}
}