mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 22:53:09 +01:00
Sync keys with linked devices.
This commit is contained in:
@@ -1672,7 +1672,13 @@ public class SignalServiceMessageSender {
|
||||
|
||||
if (keysMessage.getStorageService().isPresent()) {
|
||||
builder.storageService(ByteString.of(keysMessage.getStorageService().get().serialize()));
|
||||
} else {
|
||||
}
|
||||
|
||||
if (keysMessage.getMaster().isPresent()) {
|
||||
builder.master(ByteString.of(keysMessage.getMaster().get().serialize()));
|
||||
}
|
||||
|
||||
if (builder.storageService == null && builder.master == null) {
|
||||
Log.w(TAG, "Invalid keys message!");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.whispersystems.signalservice.api.messages.multidevice;
|
||||
|
||||
|
||||
|
||||
import org.whispersystems.signalservice.api.kbs.MasterKey;
|
||||
import org.whispersystems.signalservice.api.storage.StorageKey;
|
||||
|
||||
import java.util.Optional;
|
||||
@@ -9,12 +9,18 @@ import java.util.Optional;
|
||||
public class KeysMessage {
|
||||
|
||||
private final Optional<StorageKey> storageService;
|
||||
private final Optional<MasterKey> master;
|
||||
|
||||
public KeysMessage(Optional<StorageKey> storageService) {
|
||||
public KeysMessage(Optional<StorageKey> storageService, Optional<MasterKey> master) {
|
||||
this.storageService = storageService;
|
||||
this.master = master;
|
||||
}
|
||||
|
||||
public Optional<StorageKey> getStorageService() {
|
||||
return storageService;
|
||||
}
|
||||
|
||||
public Optional<MasterKey> getMaster() {
|
||||
return master;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user