mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-15 23:31:55 +00:00
Server signed group v2 changes sent and received P2P.
This commit is contained in:
committed by
Greyson Parrelli
parent
ec8d5defd4
commit
2f9320989a
@@ -1072,10 +1072,17 @@ public class SignalServiceMessageSender {
|
||||
}
|
||||
|
||||
private static GroupContextV2 createGroupContent(SignalServiceGroupV2 group) {
|
||||
return GroupContextV2.newBuilder()
|
||||
.setMasterKey(ByteString.copyFrom(group.getMasterKey().serialize()))
|
||||
.setRevision(group.getRevision())
|
||||
.build();
|
||||
GroupContextV2.Builder builder = GroupContextV2.newBuilder()
|
||||
.setMasterKey(ByteString.copyFrom(group.getMasterKey().serialize()))
|
||||
.setRevision(group.getRevision());
|
||||
|
||||
|
||||
byte[] signedGroupChange = group.getSignedGroupChange();
|
||||
if (signedGroupChange != null && signedGroupChange.length <= 2048) {
|
||||
builder.setGroupChange(ByteString.copyFrom(signedGroupChange));
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
private List<DataMessage.Contact> createSharedContactContent(List<SharedContact> contacts) throws IOException {
|
||||
|
||||
@@ -132,15 +132,11 @@ public final class GroupsV2Api {
|
||||
return form.getKey();
|
||||
}
|
||||
|
||||
public DecryptedGroupChange patchGroup(GroupChange.Actions groupChange,
|
||||
GroupSecretParams groupSecretParams,
|
||||
GroupsV2AuthorizationString authorization)
|
||||
throws IOException, VerificationFailedException, InvalidGroupStateException
|
||||
public GroupChange patchGroup(GroupChange.Actions groupChange,
|
||||
GroupsV2AuthorizationString authorization)
|
||||
throws IOException
|
||||
{
|
||||
GroupChange groupChanges = socket.patchGroupsV2Group(groupChange, authorization.toString());
|
||||
|
||||
return groupsOperations.forGroup(groupSecretParams)
|
||||
.decryptChange(groupChanges, true);
|
||||
return socket.patchGroupsV2Group(groupChange, authorization.toString());
|
||||
}
|
||||
|
||||
private static HashMap<Integer, AuthCredentialResponse> parseCredentialResponse(CredentialResponse credentialResponse)
|
||||
|
||||
Reference in New Issue
Block a user