mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Update libsignal-service-java
This commit is contained in:
parent
be0e8ddd8a
commit
17c24b3ff2
10 changed files with 33 additions and 11 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
**Attention**: Now requires libsignal-client version 0.42.0
|
||||
|
||||
## [0.13.2] - 2024-03-23
|
||||
|
||||
**Attention**: Now requires libsignal-client version 0.40.1
|
||||
|
|
|
@ -31,12 +31,13 @@ public class ProofRequiredException extends Exception {
|
|||
}
|
||||
|
||||
public enum Option {
|
||||
RECAPTCHA,
|
||||
CAPTCHA,
|
||||
PUSH_CHALLENGE;
|
||||
|
||||
static Option from(org.whispersystems.signalservice.api.push.exceptions.ProofRequiredException.Option option) {
|
||||
return switch (option) {
|
||||
case RECAPTCHA -> RECAPTCHA;
|
||||
case RECAPTCHA -> CAPTCHA;
|
||||
case CAPTCHA -> CAPTCHA;
|
||||
case PUSH_CHALLENGE -> PUSH_CHALLENGE;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class LiveConfig {
|
|||
private static final Optional<SignalProxy> proxy = Optional.empty();
|
||||
|
||||
private static final byte[] zkGroupServerPublicParams = Base64.getDecoder()
|
||||
.decode("AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94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54DgFyLiRcq1FvwKw2EPQdk4HDoePrO/RNUbyNddnM/mMgj4FW65xCoT1LmjrIjsv/Ggdlx46ueczhMgtBunx1/w8k8V+l8LVZ8gAT6wkU5J+DPQalQguMg12Jzug3q4TbdHiGCmD9EunCwOmsLuLJkz6EcSYXtrlDEnAM+hicw7iergYLLlMXpfTdGxJCWJmP4zqUFeTTmsmhsjGBt7NiEB/9pFFEB3pSbf4iiUukw63Eo8Aqnf4iwob6X1QviCWuc8t0LUlT9vALgh/f2DPVOOmR0RW6bgRvc7DSF20V/omg+YBw==");
|
||||
private static final byte[] genericServerPublicParams = Base64.getDecoder()
|
||||
.decode("AByD873dTilmOSG0TjKrvpeaKEsUmIO8Vx9BeMmftwUs9v7ikPwM8P3OHyT0+X3EUMZrSe9VUp26Wai51Q9I8mdk0hX/yo7CeFGJyzoOqn8e/i4Ygbn5HoAyXJx5eXfIbqpc0bIxzju4H/HOQeOpt6h742qii5u/cbwOhFZCsMIbElZTaeU+BWMBQiZHIGHT5IE0qCordQKZ5iPZom0HeFa8Yq0ShuEyAl0WINBiY6xE3H/9WnvzXBbMuuk//eRxXgzO8ieCeK8FwQNxbfXqZm6Ro1cMhCOF3u7xoX83QhpN");
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class StagingConfig {
|
|||
private static final Optional<SignalProxy> proxy = Optional.empty();
|
||||
|
||||
private static final byte[] zkGroupServerPublicParams = Base64.getDecoder()
|
||||
.decode("ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X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vuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUjlENAErBme1YHmOSpU6tr6doJ66dPzVAWIanmO/5mgjNEDeK7DDqQdB1xd03HT2Qs2TxY3kCK8aAb/0iM0HQiXjxZ9HIgYhbtvGEnDKW5ILSUydqH/KBhW4Pb0jZWnqN/YgbWDKeJxnDbYcUob5ZY5Lt5ZCMKuaGUvCJRrCtuugSMaqjowCGRempsDdJEt+cMaalhZ6gczklJB/IbdwENW9KeVFPoFNFzhxWUIS5ML9riVYhAtE6JE5jX0xiHNVIIPthb458cfA8daR0nYfYAUKogQArm0iBezOO+mPk5vCNWI+wwkyFCqNDXz/qxl1gAntuCJtSfq9OC3NkdhQlgYQ==");
|
||||
private static final byte[] genericServerPublicParams = Base64.getDecoder()
|
||||
.decode("AHILOIrFPXX9laLbalbA9+L1CXpSbM/bTJXZGZiuyK1JaI6dK5FHHWL6tWxmHKYAZTSYmElmJ5z2A5YcirjO/yfoemE03FItyaf8W1fE4p14hzb5qnrmfXUSiAIVrhaXVwIwSzH6RL/+EO8jFIjJ/YfExfJ8aBl48CKHgu1+A6kWynhttonvWWx6h7924mIzW0Czj2ROuh4LwQyZypex4GuOPW8sgIT21KNZaafgg+KbV7XM1x1tF3XA17B4uGUaDbDw2O+nR1+U5p6qHPzmJ7ggFjSN6Utu+35dS1sS0P9N");
|
||||
|
||||
|
|
|
@ -201,7 +201,6 @@ public class SyncHelper {
|
|||
Optional.ofNullable(contact == null ? null : contact.color()),
|
||||
Optional.ofNullable(verifiedMessage),
|
||||
Optional.ofNullable(profileKey),
|
||||
contact != null && contact.isBlocked(),
|
||||
Optional.ofNullable(contact == null ? null : contact.messageExpirationTime()),
|
||||
Optional.empty(),
|
||||
contact != null && contact.isArchived());
|
||||
|
@ -357,7 +356,6 @@ public class SyncHelper {
|
|||
if (c.getExpirationTimer().isPresent()) {
|
||||
builder.withMessageExpirationTime(c.getExpirationTimer().get());
|
||||
}
|
||||
builder.withIsBlocked(c.isBlocked());
|
||||
builder.withIsArchived(c.isArchived());
|
||||
account.getContactStore().storeContact(recipientId, builder.build());
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ public class ManagerImpl implements Manager {
|
|||
|
||||
try {
|
||||
dependencies.getAccountManager().submitRateLimitRecaptchaChallenge(challenge, captcha);
|
||||
} catch (org.whispersystems.signalservice.api.push.exceptions.CaptchaRejectedException ignored) {
|
||||
} catch (org.whispersystems.signalservice.internal.push.exceptions.CaptchaRejectedException ignored) {
|
||||
throw new CaptchaRejectedException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,6 +104,23 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
|
|||
profileFamilyName = local.getProfileFamilyName().orElse("");
|
||||
}
|
||||
|
||||
String nicknameGivenName;
|
||||
String nicknameFamilyName;
|
||||
if (remote.getNicknameGivenName().isPresent()) {
|
||||
nicknameGivenName = remote.getNicknameGivenName().orElse("");
|
||||
nicknameFamilyName = remote.getNicknameFamilyName().orElse("");
|
||||
} else {
|
||||
nicknameGivenName = local.getNicknameGivenName().orElse("");
|
||||
nicknameFamilyName = local.getNicknameFamilyName().orElse("");
|
||||
}
|
||||
|
||||
if (nicknameGivenName.isBlank() && !nicknameFamilyName.isBlank()) {
|
||||
logger.debug("Processed invalid nickname. Missing given name.");
|
||||
|
||||
nicknameGivenName = "";
|
||||
nicknameFamilyName = "";
|
||||
}
|
||||
|
||||
IdentityState identityState;
|
||||
byte[] identityKey;
|
||||
if (remote.getIdentityKey().isPresent() && (
|
||||
|
@ -181,6 +198,7 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
|
|||
: remote.getSystemFamilyName().orElse("");
|
||||
final var systemNickname = remote.getSystemNickname().orElse("");
|
||||
final var pniSignatureVerified = remote.isPniSignatureVerified() || local.isPniSignatureVerified();
|
||||
final var note = remote.getNote().or(local::getNote).orElse("");
|
||||
|
||||
final var mergedBuilder = new SignalContactRecord.Builder(remote.getId().getRaw(), aci, unknownFields).setE164(
|
||||
e164)
|
||||
|
@ -202,7 +220,10 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
|
|||
.setHideStory(hideStory)
|
||||
.setUnregisteredTimestamp(unregisteredTimestamp)
|
||||
.setHidden(hidden)
|
||||
.setPniSignatureVerified(pniSignatureVerified);
|
||||
.setPniSignatureVerified(pniSignatureVerified)
|
||||
.setNicknameGivenName(nicknameGivenName)
|
||||
.setNicknameFamilyName(nicknameFamilyName)
|
||||
.setNote(note);
|
||||
final var merged = mergedBuilder.build();
|
||||
|
||||
final var matchesRemote = doProtosMatch(merged, remote);
|
||||
|
|
|
@ -15,7 +15,7 @@ dependencyResolutionManagement {
|
|||
library("slf4j.jul", "org.slf4j", "jul-to-slf4j").versionRef("slf4j")
|
||||
library("logback", "ch.qos.logback", "logback-classic").version("1.5.3")
|
||||
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_98")
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_99")
|
||||
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.45.2.0")
|
||||
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
|
||||
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2")
|
||||
|
|
|
@ -8,7 +8,7 @@ public class BaseConfig {
|
|||
public static final String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();
|
||||
|
||||
static final String USER_AGENT_SIGNAL_ANDROID = Optional.ofNullable(System.getenv("SIGNAL_CLI_USER_AGENT"))
|
||||
.orElse("Signal-Android/7.1.3");
|
||||
.orElse("Signal-Android/7.2.0");
|
||||
static final String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
|
||||
? "signal-cli"
|
||||
: PROJECT_NAME + "/" + PROJECT_VERSION;
|
||||
|
|
|
@ -91,7 +91,7 @@ public class SendMessageResultUtils {
|
|||
return String.format(
|
||||
"CAPTCHA proof required for sending to \"%s\", available options \"%s\" with challenge token \"%s\", or wait \"%d\" seconds.\n"
|
||||
+ (
|
||||
failure.getOptions().contains(ProofRequiredException.Option.RECAPTCHA)
|
||||
failure.getOptions().contains(ProofRequiredException.Option.CAPTCHA)
|
||||
? """
|
||||
To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
|
||||
After solving the captcha, right-click on the "Open Signal" link and copy the link.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue