use of org.signal.storageservice.protos.groups.GroupJoinInfo in project Signal-Android by signalapp.
the class GroupsV2Operations_decrypt_groupJoinInfo_Test method add_from_invite_link_access_control_passed_though_5_any.
@Test
public void add_from_invite_link_access_control_passed_though_5_any() {
GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setAddFromInviteLink(AccessControl.AccessRequired.ANY).build();
DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
assertEquals(AccessControl.AccessRequired.ANY, decryptedGroupJoinInfo.getAddFromInviteLink());
}
use of org.signal.storageservice.protos.groups.GroupJoinInfo in project Signal-Android by signalapp.
the class GroupsV2Operations_decrypt_groupJoinInfo_Test method decrypt_description_field_8.
@Test
public void decrypt_description_field_8() {
GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setDescription(groupOperations.encryptDescription("Description!")).build();
DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
assertEquals("Description!", decryptedGroupJoinInfo.getDescription());
}
use of org.signal.storageservice.protos.groups.GroupJoinInfo in project Signal-Android by signalapp.
the class GroupsV2Operations_decrypt_groupJoinInfo_Test method revision_passed_though_6.
@Test
public void revision_passed_though_6() {
GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setRevision(11).build();
DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
assertEquals(11, decryptedGroupJoinInfo.getRevision());
}
use of org.signal.storageservice.protos.groups.GroupJoinInfo in project Signal-Android by signalapp.
the class GroupsV2Api method getGroupJoinInfo.
public DecryptedGroupJoinInfo getGroupJoinInfo(GroupSecretParams groupSecretParams, Optional<byte[]> password, GroupsV2AuthorizationString authorization) throws IOException, GroupLinkNotActiveException {
try {
GroupJoinInfo joinInfo = socket.getGroupJoinInfo(password, authorization);
GroupsV2Operations.GroupOperations groupOperations = groupsOperations.forGroup(groupSecretParams);
return groupOperations.decryptGroupJoinInfo(joinInfo);
} catch (ForbiddenException e) {
throw new GroupLinkNotActiveException();
}
}
use of org.signal.storageservice.protos.groups.GroupJoinInfo in project Signal-Android by WhisperSystems.
the class GroupsV2Operations_decrypt_groupJoinInfo_Test method decrypt_description_field_8.
@Test
public void decrypt_description_field_8() {
GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setDescription(groupOperations.encryptDescription("Description!")).build();
DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
assertEquals("Description!", decryptedGroupJoinInfo.getDescription());
}
Aggregations