Handle identity key change errors on encrypt
We need to capture key change errors from the protocol library when we call encrypt. Previously we would only see these on session init. // FREEBIE
This commit is contained in:
@@ -38908,6 +38908,10 @@ OutgoingMessage.prototype = {
|
||||
this.registerError(number, "Failed to reload device keys", error);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
} else if (error.message === "Identity key changed") {
|
||||
error = new textsecure.OutgoingIdentityKeyError(
|
||||
number, this.message.toArrayBuffer(), this.timestamp);
|
||||
this.registerError(number, "Identity key changed", error);
|
||||
} else {
|
||||
this.registerError(number, "Failed to create or send message", error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user