Fixes to get local verification and sync messages working

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-06-15 18:11:18 -07:00
parent c43d96904d
commit 4a1dc46ab3
7 changed files with 23 additions and 42 deletions

View file

@ -292,20 +292,20 @@
}
function onVerification(ev) {
var number = ev.destination;
var key = ev.identityKey;
var number = ev.verification.destination;
var key = ev.verification.identityKey;
var state;
console.log('got verification sync for', number, state);
switch(ev.state) {
case textsecure.protobuf.Verification.State.DEFAULT:
switch(ev.verification.state) {
case textsecure.protobuf.SyncMessage.Verification.State.DEFAULT:
state = 'DEFAULT';
break;
case textsecure.protobuf.Verification.State.VERIFIED:
case textsecure.protobuf.SyncMessage.Verification.State.VERIFIED:
state = 'VERIFIED';
break;
case textsecure.protobuf.Verification.State.NO_LONGER_VERIFIED:
case textsecure.protobuf.SyncMessage.Verification.State.NO_LONGER_VERIFIED:
state = 'UNVERIFIED';
break;
}
@ -336,29 +336,6 @@
});
}
function onVerification(ev) {
var state;
switch(ev.state) {
case textsecure.protobuf.Verification.State.DEFAULT:
state = 'DEFAULT';
break;
case textsecure.protobuf.Verification.State.VERIFIED:
state = 'VERIFIED';
break;
case textsecure.protobuf.Verification.State.NO_LONGER_VERIFIED:
state = 'UNVERIFIED';
break;
}
console.log('got verification sync for', ev.destination, state);
/* TODO
processVerifiedMessage(
textsecure.storage.protocol.VerifiedStatus[state],
ev.destination,
ev.identityKey
);
*/
}
window.owsDesktopApp = {
getAppView: function(destWindow) {