Update libsignal-service-java

This commit is contained in:
AsamK 2022-09-17 09:54:34 +02:00
parent 1d77153a2b
commit 60ed2c292f
7 changed files with 56 additions and 13 deletions

View file

@ -14,7 +14,7 @@ repositories {
}
dependencies {
implementation("com.github.turasa", "signal-service-java", "2.15.3_unofficial_56")
implementation("com.github.turasa", "signal-service-java", "2.15.3_unofficial_57")
implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.3")
implementation("com.google.protobuf", "protobuf-javalite", "3.11.4")
implementation("org.bouncycastle", "bcprov-jdk15on", "1.70")

View file

@ -837,11 +837,13 @@ public record MessageEnvelope(
}
}
public record Gradient(Optional<Color> startColor, Optional<Color> endColor, Optional<Integer> angle) {
public record Gradient(
List<Color> colors, List<Float> positions, Optional<Integer> angle
) {
static Gradient from(SignalServiceTextAttachment.Gradient gradient) {
return new Gradient(gradient.getStartColor().map(Color::new),
gradient.getEndColor().map(Color::new),
return new Gradient(gradient.getColors().stream().map(Color::new).toList(),
gradient.getPositions(),
gradient.getAngle());
}
}

View file

@ -31,7 +31,16 @@ public class ServiceConfig {
public static final AccountAttributes.Capabilities capabilities;
static {
capabilities = new AccountAttributes.Capabilities(false, true, false, true, true, true, true, false, false);
capabilities = new AccountAttributes.Capabilities(false,
true,
false,
true,
true,
true,
true,
false,
false,
false);
try {
TrustStore contactTrustStore = new IasTrustStore();

View file

@ -262,11 +262,6 @@ public final class ProfileHelper {
return now - profile.getLastUpdateTimestamp() >= 6 * 60 * 60 * 1000;
}
private SignalServiceProfile retrieveProfileSync(String username) throws IOException {
final var locale = Utils.getDefaultLocale(Locale.US);
return dependencies.getMessageReceiver().retrieveProfileByUsername(username, Optional.empty(), locale);
}
private Profile decryptProfileAndDownloadAvatar(
final RecipientId recipientId, final ProfileKey profileKey, final SignalServiceProfile encryptedProfile
) {

View file

@ -135,4 +135,8 @@ public class RecipientHelper {
}
return uuid;
}
private ACI getRegisteredUserByUsername(String username) throws IOException {
return dependencies.getAccountManager().getAciByUsername(username);
}
}