mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Update libsignal-service-java
This commit is contained in:
parent
74e5f386fb
commit
9823ad9070
5 changed files with 8 additions and 7 deletions
|
@ -399,6 +399,7 @@ public class AccountHelper {
|
||||||
account.getAciIdentityKeyPair(),
|
account.getAciIdentityKeyPair(),
|
||||||
account.getPniIdentityKeyPair(),
|
account.getPniIdentityKeyPair(),
|
||||||
account.getProfileKey(),
|
account.getProfileKey(),
|
||||||
|
account.getOrCreatePinMasterKey(),
|
||||||
verificationCode);
|
verificationCode);
|
||||||
} catch (InvalidKeyException e) {
|
} catch (InvalidKeyException e) {
|
||||||
throw new InvalidDeviceLinkException("Invalid device link", 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.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
@ -140,7 +141,7 @@ public class SignalProtocolStore implements SignalServiceAccountDataStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SignalProtocolAddress> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
public Map<SignalProtocolAddress, SessionRecord> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||||
return sessionStore.getAllAddressesWithActiveSessions(addressNames);
|
return sessionStore.getAllAddressesWithActiveSessions(addressNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class SessionStore implements SignalServiceSessionStore {
|
public class SessionStore implements SignalServiceSessionStore {
|
||||||
|
@ -198,7 +197,7 @@ public class SessionStore implements SignalServiceSessionStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SignalProtocolAddress> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
public Map<SignalProtocolAddress, SessionRecord> getAllAddressesWithActiveSessions(final List<String> addressNames) {
|
||||||
final var serviceIdsCommaSeparated = addressNames.stream()
|
final var serviceIdsCommaSeparated = addressNames.stream()
|
||||||
.map(address -> "'" + address.replaceAll("'", "''") + "'")
|
.map(address -> "'" + address.replaceAll("'", "''") + "'")
|
||||||
.collect(Collectors.joining(","));
|
.collect(Collectors.joining(","));
|
||||||
|
@ -215,9 +214,8 @@ public class SessionStore implements SignalServiceSessionStore {
|
||||||
return Utils.executeQueryForStream(statement,
|
return Utils.executeQueryForStream(statement,
|
||||||
res -> new Pair<>(getKeyFromResultSet(res), getSessionRecordFromResultSet(res)))
|
res -> new Pair<>(getKeyFromResultSet(res), getSessionRecordFromResultSet(res)))
|
||||||
.filter(pair -> isActive(pair.second()))
|
.filter(pair -> isActive(pair.second()))
|
||||||
.map(Pair::first)
|
.collect(Collectors.toMap(pair -> new SignalProtocolAddress(pair.first().address(),
|
||||||
.map(key -> new SignalProtocolAddress(key.address(), key.deviceId()))
|
pair.first().deviceId()), Pair::second));
|
||||||
.collect(Collectors.toSet());
|
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException("Failed read from session store", e);
|
throw new RuntimeException("Failed read from session store", e);
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class AttachmentUtils {
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
preview,
|
preview,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -16,7 +16,7 @@ dependencyResolutionManagement {
|
||||||
library("logback", "ch.qos.logback", "logback-classic").version("1.4.11")
|
library("logback", "ch.qos.logback", "logback-classic").version("1.4.11")
|
||||||
|
|
||||||
|
|
||||||
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.0.0")
|
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.44.0.0")
|
||||||
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
|
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
|
||||||
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.1")
|
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.1")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue