Fix GV1->GV2 migration bug where users were incorrectly marked as dropped.

fork-5.53.8
Greyson Parrelli 2020-12-04 20:30:06 -05:00
rodzic 4321fabf0b
commit 3f75e4aeb3
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -507,10 +507,11 @@ public final class GroupDatabase extends Database {
List<RecipientId> newMembers = Stream.of(DecryptedGroupUtil.membersToUuidList(decryptedGroup.getMembersList())).map(u -> RecipientId.from(u, null)).toList();
List<RecipientId> pendingMembers = Stream.of(DecryptedGroupUtil.pendingToUuidList(decryptedGroup.getPendingMembersList())).map(u -> RecipientId.from(u, null)).toList();
List<RecipientId> droppedMembers = new ArrayList<>(SetUtil.difference(record.getMembers(), newMembers));
newMembers.addAll(pendingMembers);
List<RecipientId> droppedMembers = new ArrayList<>(SetUtil.difference(record.getMembers(), newMembers));
if (droppedMembers.size() > 0) {
contentValues.put(FORMER_V1_MEMBERS, RecipientId.toSerializedList(record.getMembers()));
}