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:
parent
5d5805526a
commit
4232f5711c
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -172,6 +172,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue