mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Update libsignal-service-java
This commit is contained in:
parent
1d77153a2b
commit
60ed2c292f
7 changed files with 56 additions and 13 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
) {
|
||||
|
|
|
@ -135,4 +135,8 @@ public class RecipientHelper {
|
|||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
private ACI getRegisteredUserByUsername(String username) throws IOException {
|
||||
return dependencies.getAccountManager().getAciByUsername(username);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue