- try {
- final GroupsV2AuthorizationString groupsV2AuthorizationString = getGroupAuthForToday(
- groupSecretParams);
- final DecryptedGroup group = groupsV2Api.getGroup(groupSecretParams,
- groupsV2AuthorizationString);
- groupInfoV2.setGroup(group);
- for (DecryptedMember member : group.getMembersList()) {
- final SignalServiceAddress address = resolveSignalServiceAddress(new SignalServiceAddress(
- UuidUtil.parseOrThrow(member.getUuid().toByteArray()),
- null));
- try {
- account.getProfileStore()
- .storeProfileKey(address,
- new ProfileKey(member.getProfileKey().toByteArray()));
- } catch (InvalidInputException ignored) {
- }
- }
- } catch (IOException | VerificationFailedException | InvalidGroupStateException e) {
- System.err.println("Failed to retrieve Group V2 info, ignoring ...");
- }