Fix key verification screen

This commit is contained in:
lilia 2015-05-26 17:08:14 -07:00
parent e2eff893d4
commit 3e73282a64

View file

@ -79,19 +79,21 @@
verifyIdentity: function() { verifyIdentity: function() {
if (this.model.isPrivate()) { if (this.model.isPrivate()) {
var number = this.model.id; var their_number = this.model.id;
var view = new Whisper.KeyVerificationView({ var our_number = textsecure.storage.user.getNumber();
model: { textsecure.storage.axolotl.getIdentityKey(their_number).then(function(their_key) {
their_key: textsecure.storage.axolotl.getIdentityKey(number), textsecure.storage.axolotl.getIdentityKey(our_number).then(function(our_key) {
your_key: textsecure.storage.axolotl.getIdentityKey(textsecure.storage.user.getNumber()) var view = new Whisper.KeyVerificationView({
} model: { their_key: their_key, your_key: our_key }
}); });
this.$el.hide(); this.$el.hide();
view.render().$el.insertAfter(this.el); view.render().$el.insertAfter(this.el);
this.listenTo(view, 'back', function() { this.listenTo(view, 'back', function() {
view.remove(); view.remove();
this.$el.show(); this.$el.show();
}); }.bind(this));
}.bind(this));
}.bind(this));
} }
}, },