On Sender Key distribution message failure, don't update send status

This commit is contained in:
Scott Nonnenberg 2022-06-02 14:25:55 -07:00 committed by GitHub
parent db523f0684
commit e09d148c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 13 deletions

View file

@ -204,6 +204,8 @@ export class SendMessageProtoError extends Error implements CallbackResultType {
public readonly recipients?: Record<string, Array<number>>;
public readonly sendIsNotFinal?: boolean;
constructor({
successfulIdentifiers,
failoverIdentifiers,
@ -214,6 +216,7 @@ export class SendMessageProtoError extends Error implements CallbackResultType {
contentProto,
timestamp,
recipients,
sendIsNotFinal,
}: CallbackResultType) {
super(`SendMessageProtoError: ${SendMessageProtoError.getMessage(errors)}`);
@ -226,6 +229,7 @@ export class SendMessageProtoError extends Error implements CallbackResultType {
this.contentProto = contentProto;
this.timestamp = timestamp;
this.recipients = recipients;
this.sendIsNotFinal = sendIsNotFinal;
}
protected static getMessage(errors: CallbackResultType['errors']): string {