mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
parent
a2b002ac5e
commit
10b9c264fd
4 changed files with 12 additions and 12 deletions
|
@ -38,7 +38,7 @@ import org.signal.storageservice.protos.groups.local.DecryptedGroupChange;
|
|||
import org.signal.storageservice.protos.groups.local.DecryptedGroupJoinInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.signalservice.api.groupsv2.DecryptedGroupHistoryEntry;
|
||||
import org.whispersystems.signalservice.api.groupsv2.DecryptedGroupChangeLog;
|
||||
import org.whispersystems.signalservice.api.groupsv2.GroupLinkNotActiveException;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentStream;
|
||||
|
@ -482,11 +482,10 @@ public class GroupHelper {
|
|||
final var newProfileKeys = new HashMap<RecipientId, ProfileKey>();
|
||||
while (true) {
|
||||
final var page = context.getGroupV2Helper().getDecryptedGroupHistoryPage(groupSecretParams, fromRevision);
|
||||
page.getResults()
|
||||
page.getChangeLogs()
|
||||
.stream()
|
||||
.map(DecryptedGroupHistoryEntry::getChange)
|
||||
.filter(Optional::isPresent)
|
||||
.map(Optional::get)
|
||||
.map(DecryptedGroupChangeLog::getChange)
|
||||
.filter(Objects::nonNull)
|
||||
.map(context.getGroupV2Helper()::getAuthoritativeProfileKeyFromChange)
|
||||
.filter(Objects::nonNull)
|
||||
.forEach(p -> {
|
||||
|
@ -495,7 +494,7 @@ public class GroupHelper {
|
|||
final var recipientId = account.getRecipientResolver().resolveRecipient(serviceId);
|
||||
newProfileKeys.put(recipientId, profileKey);
|
||||
});
|
||||
if (!page.getPagingData().hasMorePages()) {
|
||||
if (!page.getPagingData().getHasMorePages()) {
|
||||
break;
|
||||
}
|
||||
fromRevision = page.getPagingData().getNextPageRevision();
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.whispersystems.signalservice.api.util.CredentialsProvider;
|
|||
import org.whispersystems.signalservice.api.util.UptimeSleepTimer;
|
||||
import org.whispersystems.signalservice.api.websocket.WebSocketFactory;
|
||||
import org.whispersystems.signalservice.internal.push.PushServiceSocket;
|
||||
import org.whispersystems.signalservice.internal.websocket.LibSignalNetwork;
|
||||
import org.whispersystems.signalservice.internal.websocket.OkHttpWebSocketConnection;
|
||||
import org.whispersystems.signalservice.internal.websocket.WebSocketConnection;
|
||||
|
||||
|
@ -51,7 +50,7 @@ public class SignalDependencies {
|
|||
private ClientZkOperations clientZkOperations;
|
||||
|
||||
private PushServiceSocket pushServiceSocket;
|
||||
private LibSignalNetwork libSignalNetwork;
|
||||
private Network libSignalNetwork;
|
||||
private SignalWebSocket signalWebSocket;
|
||||
private SignalServiceMessageReceiver messageReceiver;
|
||||
private SignalServiceMessageSender messageSender;
|
||||
|
@ -108,10 +107,9 @@ public class SignalDependencies {
|
|||
ServiceConfig.AUTOMATIC_NETWORK_RETRY));
|
||||
}
|
||||
|
||||
public LibSignalNetwork getLibSignalNetwork() {
|
||||
public Network getLibSignalNetwork() {
|
||||
return getOrCreate(() -> libSignalNetwork,
|
||||
() -> libSignalNetwork = new LibSignalNetwork(new Network(serviceEnvironmentConfig.netEnvironment(),
|
||||
userAgent), serviceEnvironmentConfig.signalServiceConfiguration()));
|
||||
() -> libSignalNetwork = new Network(serviceEnvironmentConfig.netEnvironment(), userAgent));
|
||||
}
|
||||
|
||||
public SignalServiceAccountManager getAccountManager() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue