Add key verification screen
Accessible from the menu on private conversations.
This commit is contained in:
parent
33b9a11e65
commit
dcc1588219
6 changed files with 132 additions and 3 deletions
|
@ -27,11 +27,28 @@
|
|||
this.conversation = options.conversation;
|
||||
},
|
||||
events: {
|
||||
'click .back': 'goBack'
|
||||
'click .back': 'goBack',
|
||||
'verify': 'verify'
|
||||
},
|
||||
goBack: function() {
|
||||
this.trigger('back');
|
||||
},
|
||||
verify: function(number) {
|
||||
var view = new Whisper.KeyVerificationView({
|
||||
model: {
|
||||
their_key: textsecure.storage.devices.getIdentityKeyForNumber(number),
|
||||
your_key: textsecure.storage.devices.getIdentityKeyForNumber(
|
||||
textsecure.utils.unencodeNumber(textsecure.storage.getUnencrypted("number_id"))[0]
|
||||
)
|
||||
}
|
||||
});
|
||||
this.$el.hide();
|
||||
view.render().$el.insertAfter(this.el);
|
||||
this.listenTo(view, 'back', function() {
|
||||
view.remove();
|
||||
this.$el.show();
|
||||
});
|
||||
},
|
||||
render: function() {
|
||||
this.$el.html(Mustache.render(this.template, {
|
||||
sent_at: moment(this.model.get('sent_at')).toString(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue