account.getDeviceId(), account.getSignalProtocolStore(), userAgent, account.isMultiDevice(), attachmentsV3, Optional.fromNullable(messagePipe), Optional.fromNullable(unidentifiedMessagePipe), Optional.absent(), clientZkProfileOperations);
}
- private SignalServiceProfile getRecipientProfile(SignalServiceAddress address, Optional<UnidentifiedAccess> unidentifiedAccess) throws IOException {
+ private SignalServiceProfile getEncryptedRecipientProfile(SignalServiceAddress address, Optional<UnidentifiedAccess> unidentifiedAccess) throws IOException {
SignalServiceMessagePipe pipe = unidentifiedMessagePipe != null && unidentifiedAccess.isPresent() ? unidentifiedMessagePipe
: messagePipe;
}
}
+ private SignalProfile getRecipientProfile(SignalServiceAddress address, Optional<UnidentifiedAccess> unidentifiedAccess, ProfileKey profileKey) throws IOException {
+ return decryptProfile(getEncryptedRecipientProfile(address, unidentifiedAccess), profileKey);
+ }
+
private Optional<SignalServiceAttachmentStream> createGroupAvatarAttachment(byte[] groupId) throws IOException {
File file = getGroupAvatarFile(groupId);
if (!file.exists()) {
}
SignalProfile targetProfile;
try {
- targetProfile = decryptProfile(getRecipientProfile(recipient, Optional.absent()), theirProfileKey);
+ targetProfile = getRecipientProfile(recipient, Optional.absent(), theirProfileKey);
} catch (IOException e) {
System.err.println("Failed to get recipient profile: " + e);
return null;