mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Add key verification screen
Accessible from the menu on private conversations.
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user