mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Update libsignal-service-java
This commit is contained in:
parent
f445cfb5c1
commit
30690785fd
19 changed files with 71 additions and 42 deletions
|
@ -14,7 +14,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api("com.github.turasa:signal-service-java:2.15.3_unofficial_22")
|
||||
api("com.github.turasa:signal-service-java:2.15.3_unofficial_23")
|
||||
implementation("com.google.protobuf:protobuf-javalite:3.10.0")
|
||||
implementation("org.bouncycastle:bcprov-jdk15on:1.68")
|
||||
implementation("org.slf4j:slf4j-api:1.7.30")
|
||||
|
|
|
@ -74,11 +74,15 @@ public class AvatarStore {
|
|||
}
|
||||
|
||||
private File getContactAvatarFile(SignalServiceAddress address) {
|
||||
return new File(avatarsPath, "contact-" + address.getLegacyIdentifier());
|
||||
return new File(avatarsPath, "contact-" + getLegacyIdentifier(address));
|
||||
}
|
||||
|
||||
private String getLegacyIdentifier(final SignalServiceAddress address) {
|
||||
return address.getNumber().or(() -> address.getUuid().get().toString());
|
||||
}
|
||||
|
||||
private File getProfileAvatarFile(SignalServiceAddress address) {
|
||||
return new File(avatarsPath, "profile-" + address.getLegacyIdentifier());
|
||||
return new File(avatarsPath, "profile-" + getLegacyIdentifier(address));
|
||||
}
|
||||
|
||||
private void createAvatarsDir() throws IOException {
|
||||
|
|
|
@ -641,7 +641,7 @@ public class Manager implements Closeable {
|
|||
}
|
||||
} catch (InvalidKeyException ignored) {
|
||||
logger.warn("Got invalid identity key in profile for {}",
|
||||
resolveSignalServiceAddress(recipientId).getLegacyIdentifier());
|
||||
resolveSignalServiceAddress(recipientId).getIdentifier());
|
||||
}
|
||||
return profileAndCredential;
|
||||
}
|
||||
|
|
|
@ -176,7 +176,8 @@ public class GroupV2Helper {
|
|||
final var noUuidCapability = members.stream()
|
||||
.map(addressResolver::resolveSignalServiceAddress)
|
||||
.filter(address -> !address.getUuid().isPresent())
|
||||
.map(SignalServiceAddress::getLegacyIdentifier)
|
||||
.map(SignalServiceAddress::getNumber)
|
||||
.map(Optional::get)
|
||||
.collect(Collectors.toSet());
|
||||
if (noUuidCapability.size() > 0) {
|
||||
logger.warn("Cannot create a V2 group as some members don't have a UUID: {}",
|
||||
|
|
|
@ -96,7 +96,7 @@ public class MessageCacheUtils {
|
|||
out.writeInt(0);
|
||||
}
|
||||
out.writeLong(envelope.getServerReceivedTimestamp());
|
||||
var uuid = envelope.getUuid();
|
||||
var uuid = envelope.getServerGuid();
|
||||
out.writeUTF(uuid == null ? "" : uuid);
|
||||
out.writeLong(envelope.getServerDeliveredTimestamp());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue