Update libsignal-service-java dependency

This commit is contained in:
AsamK 2019-06-19 21:47:18 +02:00
parent 24714454dd
commit 35181251bf
2 changed files with 7 additions and 4 deletions

View file

@ -20,7 +20,7 @@ repositories {
} }
dependencies { dependencies {
compile 'com.github.turasa:signal-service-java:2.13.0_unofficial_2' compile 'com.github.turasa:signal-service-java:2.13.4_unofficial_1'
compile 'org.bouncycastle:bcprov-jdk15on:1.61' compile 'org.bouncycastle:bcprov-jdk15on:1.61'
compile 'net.sourceforge.argparse4j:argparse4j:0.8.1' compile 'net.sourceforge.argparse4j:argparse4j:0.8.1'
compile 'org.freedesktop.dbus:dbus-java:2.7.0' compile 'org.freedesktop.dbus:dbus-java:2.7.0'

View file

@ -56,6 +56,7 @@ import org.whispersystems.signalservice.api.util.InvalidNumberException;
import org.whispersystems.signalservice.api.util.SleepTimer; import org.whispersystems.signalservice.api.util.SleepTimer;
import org.whispersystems.signalservice.api.util.UptimeSleepTimer; import org.whispersystems.signalservice.api.util.UptimeSleepTimer;
import org.whispersystems.signalservice.internal.push.SignalServiceProtos; import org.whispersystems.signalservice.internal.push.SignalServiceProtos;
import org.whispersystems.signalservice.internal.push.UnsupportedDataMessageException;
import org.whispersystems.signalservice.internal.util.Base64; import org.whispersystems.signalservice.internal.util.Base64;
import java.io.*; import java.io.*;
@ -762,7 +763,8 @@ public class Manager implements Signal {
message = messageBuilder.build(); message = messageBuilder.build();
if (message.getGroupInfo().isPresent()) { if (message.getGroupInfo().isPresent()) {
try { try {
List<SendMessageResult> result = messageSender.sendMessage(new ArrayList<>(recipientsTS), getAccessFor(recipientsTS), message); final boolean isRecipientUpdate = true;
List<SendMessageResult> result = messageSender.sendMessage(new ArrayList<>(recipientsTS), getAccessFor(recipientsTS), isRecipientUpdate, message);
for (SendMessageResult r : result) { for (SendMessageResult r : result) {
if (r.getIdentityFailure() != null) { if (r.getIdentityFailure() != null) {
account.getSignalProtocolStore().saveIdentity(r.getAddress().getNumber(), r.getIdentityFailure().getIdentityKey(), TrustLevel.UNTRUSTED); account.getSignalProtocolStore().saveIdentity(r.getAddress().getNumber(), r.getIdentityFailure().getIdentityKey(), TrustLevel.UNTRUSTED);
@ -780,7 +782,8 @@ public class Manager implements Signal {
message.getTimestamp(), message.getTimestamp(),
message, message,
message.getExpiresInSeconds(), message.getExpiresInSeconds(),
Collections.singletonMap(recipient.getNumber(), unidentifiedAccess.isPresent())); Collections.singletonMap(recipient.getNumber(), unidentifiedAccess.isPresent()),
false);
SignalServiceSyncMessage syncMessage = SignalServiceSyncMessage.forSentTranscript(transcript); SignalServiceSyncMessage syncMessage = SignalServiceSyncMessage.forSentTranscript(transcript);
List<SendMessageResult> results = new ArrayList<>(recipientsTS.size()); List<SendMessageResult> results = new ArrayList<>(recipientsTS.size());
@ -822,7 +825,7 @@ public class Manager implements Signal {
} }
} }
private SignalServiceContent decryptMessage(SignalServiceEnvelope envelope) throws InvalidMetadataMessageException, ProtocolInvalidMessageException, ProtocolDuplicateMessageException, ProtocolLegacyMessageException, ProtocolInvalidKeyIdException, InvalidMetadataVersionException, ProtocolInvalidVersionException, ProtocolNoSessionException, ProtocolInvalidKeyException, ProtocolUntrustedIdentityException, SelfSendException { private SignalServiceContent decryptMessage(SignalServiceEnvelope envelope) throws InvalidMetadataMessageException, ProtocolInvalidMessageException, ProtocolDuplicateMessageException, ProtocolLegacyMessageException, ProtocolInvalidKeyIdException, InvalidMetadataVersionException, ProtocolInvalidVersionException, ProtocolNoSessionException, ProtocolInvalidKeyException, ProtocolUntrustedIdentityException, SelfSendException, UnsupportedDataMessageException {
SignalServiceCipher cipher = new SignalServiceCipher(new SignalServiceAddress(username), account.getSignalProtocolStore(), Utils.getCertificateValidator()); SignalServiceCipher cipher = new SignalServiceCipher(new SignalServiceAddress(username), account.getSignalProtocolStore(), Utils.getCertificateValidator());
try { try {
return cipher.decrypt(envelope); return cipher.decrypt(envelope);