Update protos with support for null messages

// FREEBIE
This commit is contained in:
lilia 2017-06-22 10:53:02 -07:00 committed by Scott Nonnenberg
parent 6e758fc1ea
commit 1e93b12b90
4 changed files with 28 additions and 21 deletions

View File

@ -297,13 +297,13 @@
var state;
switch(ev.verified.state) {
case textsecure.protobuf.SyncMessage.Verified.State.DEFAULT:
case textsecure.protobuf.Verified.State.DEFAULT:
state = 'DEFAULT';
break;
case textsecure.protobuf.SyncMessage.Verified.State.VERIFIED:
case textsecure.protobuf.Verified.State.VERIFIED:
state = 'VERIFIED';
break;
case textsecure.protobuf.SyncMessage.Verified.State.UNVERIFIED:
case textsecure.protobuf.Verified.State.UNVERIFIED:
state = 'UNVERIFIED';
break;
}

View File

@ -39284,7 +39284,7 @@ MessageSender.prototype = {
var myNumber = textsecure.storage.user.getNumber();
var myDevice = textsecure.storage.user.getDeviceId();
if (myDevice != 1) {
var verified = new textsecure.protobuf.SyncMessage.Verified();
var verified = new textsecure.protobuf.Verified();
verified.state = state;
verified.destination = destination;
verified.identityKey = identityKey;

View File

@ -322,7 +322,7 @@ MessageSender.prototype = {
var myNumber = textsecure.storage.user.getNumber();
var myDevice = textsecure.storage.user.getDeviceId();
if (myDevice != 1) {
var verified = new textsecure.protobuf.SyncMessage.Verified();
var verified = new textsecure.protobuf.Verified();
verified.state = state;
verified.destination = destination;
verified.identityKey = identityKey;

View File

@ -25,6 +25,24 @@ message Content {
optional DataMessage dataMessage = 1;
optional SyncMessage syncMessage = 2;
optional CallMessage callMessage = 3;
optional NullMessage nullMessage = 4;
}
message NullMessage {
optional bytes padding = 1;
}
message Verified {
enum State {
DEFAULT = 0;
VERIFIED = 1;
UNVERIFIED = 2;
}
optional string destination = 1;
optional bytes identityKey = 2;
optional State state = 3;
optional bytes nullMessage = 4;
}
message CallMessage {
@ -111,18 +129,6 @@ message SyncMessage {
optional uint64 timestamp = 2;
}
message Verified {
enum State {
DEFAULT = 0;
VERIFIED = 1;
UNVERIFIED = 2;
}
optional string destination = 1;
optional bytes identityKey = 2;
optional State state = 3;
}
optional Sent sent = 1;
optional Contacts contacts = 2;
optional Groups groups = 3;
@ -169,10 +175,11 @@ message ContactDetails {
optional uint32 length = 2;
}
optional string number = 1;
optional string name = 2;
optional Avatar avatar = 3;
optional string color = 4;
optional string number = 1;
optional string name = 2;
optional Avatar avatar = 3;
optional string color = 4;
optional Verified verified = 5;
}
message GroupDetails {