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
d3eef6c820
commit
2535cd9c2c
5 changed files with 8 additions and 7 deletions
|
@ -432,6 +432,7 @@ public class AccountHelper {
|
|||
account.getAciIdentityKeyPair(),
|
||||
account.getPniIdentityKeyPair(),
|
||||
account.getProfileKey(),
|
||||
account.getOrCreatePinMasterKey(),
|
||||
verificationCode);
|
||||
} catch (InvalidKeyException e) {
|
||||
throw new InvalidDeviceLinkException("Invalid device link", e);
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.whispersystems.signalservice.api.push.DistributionId;
|
|||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Supplier;
|
||||
|
@ -140,7 +141,7 @@ public class SignalProtocolStore implements SignalServiceAccountDataStore {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Set<SignalProtocolAddress> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||
public Map<SignalProtocolAddress, SessionRecord> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||
return sessionStore.getAllAddressesWithActiveSessions(addressNames);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class SessionStore implements SignalServiceSessionStore {
|
||||
|
@ -198,7 +197,7 @@ public class SessionStore implements SignalServiceSessionStore {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Set<SignalProtocolAddress> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||
public Map<SignalProtocolAddress, SessionRecord> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||
final var serviceIdsCommaSeparated = addressNames.stream()
|
||||
.map(address -> "'" + address.replaceAll("'", "''") + "'")
|
||||
.collect(Collectors.joining(","));
|
||||
|
@ -215,9 +214,8 @@ public class SessionStore implements SignalServiceSessionStore {
|
|||
return Utils.executeQueryForStream(statement,
|
||||
res -> new Pair<>(getKeyFromResultSet(res), getSessionRecordFromResultSet(res)))
|
||||
.filter(pair -> isActive(pair.second()))
|
||||
.map(Pair::first)
|
||||
.map(key -> new SignalProtocolAddress(key.address(), key.deviceId()))
|
||||
.collect(Collectors.toSet());
|
||||
.collect(Collectors.toMap(pair -> new SignalProtocolAddress(pair.first().address(),
|
||||
pair.first().deviceId()), Pair::second));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("Failed read from session store", e);
|
||||
|
|
|
@ -49,6 +49,7 @@ public class AttachmentUtils {
|
|||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
preview,
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencyResolutionManagement {
|
|||
library("logback", "ch.qos.logback", "logback-classic").version("1.4.14")
|
||||
|
||||
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_88")
|
||||
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_89")
|
||||
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.44.1.0")
|
||||
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
|
||||
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.1")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue