Update libsignal-service-java

This commit is contained in:
AsamK 2023-08-09 20:47:26 +02:00
parent ca088bcc33
commit 934697af28
6 changed files with 8 additions and 9 deletions

View file

@ -29,7 +29,6 @@ import org.whispersystems.signalservice.api.push.exceptions.AlreadyVerifiedExcep
import org.whispersystems.signalservice.api.push.exceptions.AuthorizationFailedException;
import org.whispersystems.signalservice.api.push.exceptions.DeprecatedVersionException;
import org.whispersystems.signalservice.api.util.DeviceNameUtil;
import org.whispersystems.signalservice.api.util.UuidUtil;
import org.whispersystems.signalservice.internal.push.KyberPreKeyEntity;
import org.whispersystems.signalservice.internal.push.OutgoingPushMessage;
import org.whispersystems.util.Base64UrlSafe;
@ -103,7 +102,7 @@ public class AccountHelper {
final var whoAmI = dependencies.getAccountManager().getWhoAmI();
final var number = whoAmI.getNumber();
final var aci = ACI.parseOrThrow(whoAmI.getAci());
final var pni = PNI.from(UuidUtil.parseOrThrow(whoAmI.getPni()));
final var pni = PNI.parseUnPrefixedOrThrow(whoAmI.getPni());
if (number.equals(account.getNumber()) && aci.equals(account.getAci()) && pni.equals(account.getPni())) {
return;
}

View file

@ -45,7 +45,6 @@ import org.whispersystems.signalservice.api.push.ServiceIdType;
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
import org.whispersystems.signalservice.api.push.exceptions.AlreadyVerifiedException;
import org.whispersystems.signalservice.api.push.exceptions.DeprecatedVersionException;
import org.whispersystems.signalservice.api.util.UuidUtil;
import org.whispersystems.signalservice.internal.push.VerifyAccountResponse;
import org.whispersystems.signalservice.internal.util.DynamicCredentialsProvider;
@ -166,7 +165,7 @@ public class RegistrationManagerImpl implements RegistrationManager {
//accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
final var aci = ACI.parseOrThrow(response.getUuid());
final var pni = PNI.from(UuidUtil.parseOrThrow(response.getPni()));
final var pni = PNI.parseUnPrefixedOrThrow(response.getPni());
account.finishRegistration(aci, pni, masterKey, pin, aciPreKeys, pniPreKeys);
accountFileUpdater.updateAccountIdentifiers(account.getNumber(), aci);

View file

@ -558,7 +558,7 @@ public class SignalAccount implements Closeable {
}
if (rootNode.hasNonNull("pni")) {
try {
pni = PNI.from(UuidUtil.parseOrThrow(rootNode.get("pni").asText()));
pni = PNI.parseUnPrefixedOrThrow(rootNode.get("pni").asText());
} catch (IllegalArgumentException e) {
throw new IOException("Config file contains an invalid pni, needs to be a valid UUID", e);
}
@ -967,7 +967,7 @@ public class SignalAccount implements Closeable {
.put("serviceEnvironment", serviceEnvironment == null ? null : serviceEnvironment.name())
.put("usernameIdentifier", username)
.put("uuid", aci == null ? null : aci.toString())
.put("pni", pni == null ? null : pni.getRawUuid().toString())
.put("pni", pni == null ? null : pni.toStringWithoutPrefix())
.put("sessionId", sessionId)
.put("sessionNumber", sessionNumber)
.put("deviceName", encryptedDeviceName)

View file

@ -57,6 +57,7 @@ public class AttachmentUtils {
blurHash,
null,
null,
resumableUploadSpec);
resumableUploadSpec,
false);
}
}