Search in sources :

Example 11 with DecryptedGroupJoinInfo

use of org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo in project Signal-Android by WhisperSystems.

the class GroupsV2Operations_decrypt_groupJoinInfo_Test method add_from_invite_link_access_control_passed_though_5_administrator.

@Test
public void add_from_invite_link_access_control_passed_though_5_administrator() {
    GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setAddFromInviteLink(AccessControl.AccessRequired.ADMINISTRATOR).build();
    DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
    assertEquals(AccessControl.AccessRequired.ADMINISTRATOR, decryptedGroupJoinInfo.getAddFromInviteLink());
}
Also used : DecryptedGroupJoinInfo(org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo) GroupJoinInfo(org.signal.storageservice.protos.groups.GroupJoinInfo) DecryptedGroupJoinInfo(org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo) Test(org.junit.Test)

Example 12 with DecryptedGroupJoinInfo

use of org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo in project Signal-Android by WhisperSystems.

the class GroupsV2Operations_decrypt_groupJoinInfo_Test method pending_approval_passed_though_7_false.

@Test
public void pending_approval_passed_though_7_false() {
    GroupJoinInfo groupJoinInfo = GroupJoinInfo.newBuilder().setPendingAdminApproval(false).build();
    DecryptedGroupJoinInfo decryptedGroupJoinInfo = groupOperations.decryptGroupJoinInfo(groupJoinInfo);
    assertFalse(decryptedGroupJoinInfo.getPendingAdminApproval());
}
Also used : DecryptedGroupJoinInfo(org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo) GroupJoinInfo(org.signal.storageservice.protos.groups.GroupJoinInfo) DecryptedGroupJoinInfo(org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo) Test(org.junit.Test)

Aggregations

DecryptedGroupJoinInfo (org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo)12 GroupJoinInfo (org.signal.storageservice.protos.groups.GroupJoinInfo)10 Test (org.junit.Test)9 Bitmap (android.graphics.Bitmap)1 NonNull (androidx.annotation.NonNull)1 WorkerThread (androidx.annotation.WorkerThread)1 IOException (java.io.IOException)1 ExecutionException (java.util.concurrent.ExecutionException)1 VerificationFailedException (org.signal.zkgroup.VerificationFailedException)1 GroupMasterKey (org.signal.zkgroup.groups.GroupMasterKey)1 Attachment (org.thoughtcrime.securesms.attachments.Attachment)1 UriAttachment (org.thoughtcrime.securesms.attachments.UriAttachment)1 GroupDatabase (org.thoughtcrime.securesms.database.GroupDatabase)1 GroupId (org.thoughtcrime.securesms.groups.GroupId)1 GroupInviteLinkUrl (org.thoughtcrime.securesms.groups.v2.GroupInviteLinkUrl)1 Recipient (org.thoughtcrime.securesms.recipients.Recipient)1 GroupLinkNotActiveException (org.whispersystems.signalservice.api.groupsv2.GroupLinkNotActiveException)1 ForbiddenException (org.whispersystems.signalservice.internal.push.exceptions.ForbiddenException)1