Fix failed identity key sync from contact sync
These were failing because ByteBuffers from the protobufs need to be converted to ArrayBuffers. Fixed by useing the existing handler in MessageReceiver to process verified messages from contact sync messages and dispatch them as their own events, reducing some complexity on the application side. // FREEBIE
This commit is contained in:
parent
78094102bd
commit
fdce4cfc7c
3 changed files with 12 additions and 6 deletions
|
@ -163,10 +163,6 @@
|
|||
}
|
||||
|
||||
ConversationController.create(c).save();
|
||||
|
||||
if (contactDetails.verified) {
|
||||
onVerified(contactDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function onGroupReceived(ev) {
|
||||
|
|
|
@ -38526,10 +38526,15 @@ MessageReceiver.prototype.extend({
|
|||
var ev = new Event('contact');
|
||||
ev.contactDetails = contactDetails;
|
||||
eventTarget.dispatchEvent(ev);
|
||||
|
||||
if (contactDetails.verified) {
|
||||
this.handleVerified([contactDetails.verified]);
|
||||
}
|
||||
|
||||
contactDetails = contactBuffer.next();
|
||||
}
|
||||
eventTarget.dispatchEvent(new Event('contactsync'));
|
||||
});
|
||||
}.bind(this));
|
||||
},
|
||||
handleGroups: function(groups) {
|
||||
console.log('group sync');
|
||||
|
|
|
@ -317,10 +317,15 @@ MessageReceiver.prototype.extend({
|
|||
var ev = new Event('contact');
|
||||
ev.contactDetails = contactDetails;
|
||||
eventTarget.dispatchEvent(ev);
|
||||
|
||||
if (contactDetails.verified) {
|
||||
this.handleVerified([contactDetails.verified]);
|
||||
}
|
||||
|
||||
contactDetails = contactBuffer.next();
|
||||
}
|
||||
eventTarget.dispatchEvent(new Event('contactsync'));
|
||||
});
|
||||
}.bind(this));
|
||||
},
|
||||
handleGroups: function(groups) {
|
||||
console.log('group sync');
|
||||
|
|
Loading…
Reference in a new issue