From 10655027701311e91e518e693736033e825d5455 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 28 Oct 2015 13:46:02 -0700 Subject: [PATCH] Change key conflict error message Include the contact's number in the message for more helpful debug log output. // FREEBIE --- js/libtextsecure.js | 8 ++++---- libtextsecure/errors.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 1b83ca0ba..f6abed1b5 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38,10 +38,10 @@ args : [number, message] }); + this.number = number.split('.')[0]; this.name = 'IncomingIdentityKeyError'; - this.message = "The identity of the sender has changed. This may be malicious, or the sender may have simply reinstalled."; + this.message = "The identity of " + this.number + " has changed."; this.identityKey = key; - this.number = number.split('.')[0]; } IncomingIdentityKeyError.prototype = new ReplayableError(); IncomingIdentityKeyError.prototype.constructor = IncomingIdentityKeyError; @@ -51,9 +51,9 @@ functionCode : Type.ENCRYPT_MESSAGE, args : [number, message, timestamp] }); - this.name = 'OutgoingIdentityKeyError'; - this.message = "The identity of the destination has changed. This may be malicious, or the destination may have simply reinstalled."; this.number = number.split('.')[0]; + this.name = 'OutgoingIdentityKeyError'; + this.message = "The identity of " + this.number + " has changed."; this.identityKey = identityKey; } OutgoingIdentityKeyError.prototype = new ReplayableError(); diff --git a/libtextsecure/errors.js b/libtextsecure/errors.js index 95b8586ce..d023fce3b 100644 --- a/libtextsecure/errors.js +++ b/libtextsecure/errors.js @@ -37,10 +37,10 @@ args : [number, message] }); + this.number = number.split('.')[0]; this.name = 'IncomingIdentityKeyError'; - this.message = "The identity of the sender has changed. This may be malicious, or the sender may have simply reinstalled."; + this.message = "The identity of " + this.number + " has changed."; this.identityKey = key; - this.number = number.split('.')[0]; } IncomingIdentityKeyError.prototype = new ReplayableError(); IncomingIdentityKeyError.prototype.constructor = IncomingIdentityKeyError; @@ -50,9 +50,9 @@ functionCode : Type.ENCRYPT_MESSAGE, args : [number, message, timestamp] }); - this.name = 'OutgoingIdentityKeyError'; - this.message = "The identity of the destination has changed. This may be malicious, or the destination may have simply reinstalled."; this.number = number.split('.')[0]; + this.name = 'OutgoingIdentityKeyError'; + this.message = "The identity of " + this.number + " has changed."; this.identityKey = identityKey; } OutgoingIdentityKeyError.prototype = new ReplayableError();