mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 11:08:02 +00:00
Support Groups v2 Change Epochs.
This commit is contained in:

committed by
Greyson Parrelli

parent
70977e5228
commit
b10fc6a0b0
@@ -466,7 +466,8 @@ final class GroupManagerV2 {
|
||||
GroupsV2Operations.GroupOperations groupOperations = groupsV2Operations.forGroup(GroupSecretParams.deriveFromMasterKey(groupMasterKey));
|
||||
|
||||
try {
|
||||
return groupOperations.decryptChange(GroupChange.parseFrom(signedGroupChange), true);
|
||||
return groupOperations.decryptChange(GroupChange.parseFrom(signedGroupChange), true)
|
||||
.orNull();
|
||||
} catch (VerificationFailedException | InvalidGroupStateException | InvalidProtocolBufferException e) {
|
||||
Log.w(TAG, "Unable to verify supplied group change", e);
|
||||
}
|
||||
|
@@ -341,7 +341,12 @@ public final class GroupsV2StateProcessor {
|
||||
}
|
||||
|
||||
for (DecryptedGroupHistoryEntry entry : groupStatesFromRevision) {
|
||||
history.add(new ServerGroupLogEntry(entry.getGroup(), ignoreServerChanges ? null : entry.getChange()));
|
||||
DecryptedGroup group = entry.getGroup().orNull();
|
||||
DecryptedGroupChange change = ignoreServerChanges ? null : entry.getChange().orNull();
|
||||
|
||||
if (group != null || change != null) {
|
||||
history.add(new ServerGroupLogEntry(group, change));
|
||||
}
|
||||
}
|
||||
|
||||
return history;
|
||||
|
Reference in New Issue
Block a user