Update libsignal-service-java

This commit is contained in:
AsamK 2021-10-24 19:16:01 +02:00
parent fc0a9b4102
commit 004293362e
7 changed files with 1081 additions and 973 deletions

View file

@ -14,7 +14,7 @@ repositories {
}
dependencies {
api("com.github.turasa:signal-service-java:2.15.3_unofficial_30")
api("com.github.turasa:signal-service-java:2.15.3_unofficial_31")
implementation("com.google.protobuf:protobuf-javalite:3.10.0")
implementation("org.bouncycastle:bcprov-jdk15on:1.69")
implementation("org.slf4j:slf4j-api:1.7.30")

View file

@ -33,6 +33,7 @@ import java.util.Base64;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
@ -228,7 +229,8 @@ public final class ProfileHelper {
}
private SignalServiceProfile retrieveProfileSync(String username) throws IOException {
return dependencies.getMessageReceiver().retrieveProfileByUsername(username, Optional.absent());
final var locale = Locale.getDefault();
return dependencies.getMessageReceiver().retrieveProfileByUsername(username, Optional.absent(), locale);
}
private ProfileAndCredential retrieveProfileAndCredential(
@ -308,11 +310,16 @@ public final class ProfileHelper {
var profileService = dependencies.getProfileService();
Single<ServiceResponse<ProfileAndCredential>> responseSingle;
final var locale = Locale.getDefault();
try {
responseSingle = profileService.getProfile(address, profileKey, unidentifiedAccess, requestType);
responseSingle = profileService.getProfile(address, profileKey, unidentifiedAccess, requestType, locale);
} catch (NoClassDefFoundError e) {
// Native zkgroup lib not available for ProfileKey
responseSingle = profileService.getProfile(address, Optional.absent(), unidentifiedAccess, requestType);
responseSingle = profileService.getProfile(address,
Optional.absent(),
unidentifiedAccess,
requestType,
locale);
}
return responseSingle.map(pair -> {