Search in sources :

Example 1 with ForbiddenException

use of org.whispersystems.signalservice.internal.push.exceptions.ForbiddenException in project Signal-Android by WhisperSystems.

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();
    }
}
Also used : DecryptedGroupJoinInfo(org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo) GroupJoinInfo(org.signal.storageservice.protos.groups.GroupJoinInfo) ForbiddenException(org.whispersystems.signalservice.internal.push.exceptions.ForbiddenException)

Aggregations

GroupJoinInfo (org.signal.storageservice.protos.groups.GroupJoinInfo)1 DecryptedGroupJoinInfo (org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo)1 ForbiddenException (org.whispersystems.signalservice.internal.push.exceptions.ForbiddenException)1