Social Graph: read-only state sync with primary device
This commit is contained in:
parent
12745a2c79
commit
8502d23576
19 changed files with 1035 additions and 57 deletions
|
@ -24,7 +24,6 @@ message Envelope {
|
|||
optional bytes content = 8; // Contains an encrypted Content
|
||||
optional string serverGuid = 9;
|
||||
optional uint64 serverTimestamp = 10;
|
||||
|
||||
}
|
||||
|
||||
message Content {
|
||||
|
@ -185,10 +184,10 @@ message DataMessage {
|
|||
}
|
||||
|
||||
message Sticker {
|
||||
optional bytes packId = 1;
|
||||
optional bytes packKey = 2;
|
||||
optional uint32 stickerId = 3;
|
||||
optional AttachmentPointer data = 4;
|
||||
optional bytes packId = 1;
|
||||
optional bytes packKey = 2;
|
||||
optional uint32 stickerId = 3;
|
||||
optional AttachmentPointer data = 4;
|
||||
}
|
||||
|
||||
message Reaction {
|
||||
|
@ -299,9 +298,9 @@ message SyncMessage {
|
|||
}
|
||||
|
||||
message Blocked {
|
||||
repeated string numbers = 1;
|
||||
repeated string uuids = 3;
|
||||
repeated bytes groupIds = 2;
|
||||
repeated string numbers = 1;
|
||||
repeated string uuids = 3;
|
||||
repeated bytes groupIds = 2;
|
||||
}
|
||||
|
||||
message Request {
|
||||
|
@ -311,11 +310,16 @@ message SyncMessage {
|
|||
GROUPS = 2;
|
||||
BLOCKED = 3;
|
||||
CONFIGURATION = 4;
|
||||
KEYS = 5;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
}
|
||||
|
||||
message Keys {
|
||||
optional bytes storageService = 1;
|
||||
}
|
||||
|
||||
message Read {
|
||||
optional string sender = 1;
|
||||
optional string senderUuid = 3;
|
||||
|
@ -323,10 +327,11 @@ message SyncMessage {
|
|||
}
|
||||
|
||||
message Configuration {
|
||||
optional bool readReceipts = 1;
|
||||
optional bool unidentifiedDeliveryIndicators = 2;
|
||||
optional bool typingIndicators = 3;
|
||||
optional bool linkPreviews = 4;
|
||||
optional bool readReceipts = 1;
|
||||
optional bool unidentifiedDeliveryIndicators = 2;
|
||||
optional bool typingIndicators = 3;
|
||||
optional bool linkPreviews = 4;
|
||||
optional uint32 provisioningVersion = 5;
|
||||
}
|
||||
|
||||
message StickerPackOperation {
|
||||
|
@ -334,6 +339,7 @@ message SyncMessage {
|
|||
INSTALL = 0;
|
||||
REMOVE = 1;
|
||||
}
|
||||
|
||||
optional bytes packId = 1;
|
||||
optional bytes packKey = 2;
|
||||
optional Type type = 3;
|
||||
|
@ -360,6 +366,16 @@ message SyncMessage {
|
|||
optional Type type = 4;
|
||||
}
|
||||
|
||||
message FetchLatest {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
LOCAL_PROFILE = 1;
|
||||
STORAGE_MANIFEST = 2;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
}
|
||||
|
||||
optional Sent sent = 1;
|
||||
optional Contacts contacts = 2;
|
||||
optional Groups groups = 3;
|
||||
|
@ -371,6 +387,8 @@ message SyncMessage {
|
|||
optional bytes padding = 8;
|
||||
repeated StickerPackOperation stickerPackOperation = 10;
|
||||
optional ViewOnceOpen viewOnceOpen = 11;
|
||||
optional FetchLatest fetchLatest = 12;
|
||||
optional Keys keys = 13;
|
||||
optional MessageRequestResponse messageRequestResponse = 14;
|
||||
}
|
||||
|
||||
|
|
102
protos/SignalStorage.proto
Normal file
102
protos/SignalStorage.proto
Normal file
|
@ -0,0 +1,102 @@
|
|||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.storage";
|
||||
option java_outer_classname = "SignalStorageProtos";
|
||||
|
||||
message StorageManifest {
|
||||
optional uint64 version = 1;
|
||||
optional bytes value = 2;
|
||||
}
|
||||
|
||||
message StorageItem {
|
||||
optional bytes key = 1;
|
||||
optional bytes value = 2;
|
||||
}
|
||||
|
||||
message StorageItems {
|
||||
repeated StorageItem items = 1;
|
||||
}
|
||||
|
||||
message ReadOperation {
|
||||
repeated bytes readKey = 1;
|
||||
}
|
||||
|
||||
message WriteOperation {
|
||||
optional StorageManifest manifest = 1;
|
||||
repeated StorageItem insertItem = 2;
|
||||
repeated bytes deleteKey = 3;
|
||||
optional bool clearAll = 4;
|
||||
}
|
||||
|
||||
message ManifestRecord {
|
||||
message Identifier {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
CONTACT = 1;
|
||||
GROUPV1 = 2;
|
||||
GROUPV2 = 3;
|
||||
ACCOUNT = 4;
|
||||
}
|
||||
|
||||
optional bytes raw = 1;
|
||||
optional Type type = 2;
|
||||
}
|
||||
|
||||
optional uint64 version = 1;
|
||||
repeated Identifier keys = 2;
|
||||
}
|
||||
|
||||
message StorageRecord {
|
||||
oneof record {
|
||||
ContactRecord contact = 1;
|
||||
GroupV1Record groupV1 = 2;
|
||||
GroupV2Record groupV2 = 3;
|
||||
AccountRecord account = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message ContactRecord {
|
||||
enum IdentityState {
|
||||
DEFAULT = 0;
|
||||
VERIFIED = 1;
|
||||
UNVERIFIED = 2;
|
||||
}
|
||||
|
||||
optional string serviceUuid = 1;
|
||||
optional string serviceE164 = 2;
|
||||
optional bytes profileKey = 3;
|
||||
optional bytes identityKey = 4;
|
||||
optional IdentityState identityState = 5;
|
||||
optional string givenName = 6;
|
||||
optional string familyName = 7;
|
||||
optional string username = 8;
|
||||
optional bool blocked = 9;
|
||||
optional bool whitelisted = 10;
|
||||
optional bool archived = 11;
|
||||
}
|
||||
|
||||
message GroupV1Record {
|
||||
optional bytes id = 1;
|
||||
optional bool blocked = 2;
|
||||
optional bool whitelisted = 3;
|
||||
optional bool archived = 4;
|
||||
}
|
||||
|
||||
message GroupV2Record {
|
||||
optional bytes masterKey = 1;
|
||||
optional bool blocked = 2;
|
||||
optional bool whitelisted = 3;
|
||||
optional bool archived = 4;
|
||||
}
|
||||
|
||||
message AccountRecord {
|
||||
optional bytes profileKey = 1;
|
||||
optional string givenName = 2;
|
||||
optional string familyName = 3;
|
||||
optional string avatarUrl = 4;
|
||||
optional bool noteToSelfArchived = 5;
|
||||
optional bool readReceipts = 6;
|
||||
optional bool sealedSenderIndicators = 7;
|
||||
optional bool typingIndicators = 8;
|
||||
optional bool linkPreviews = 9;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue