Skip to content

Commit

Permalink
feat(mls): add mlsOtherError to error ignore list
Browse files Browse the repository at this point in the history
  • Loading branch information
aweiss-dev committed Feb 21, 2025
1 parent 4e73ed3 commit d7649b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const mlsDecryptionErrorNamesToIgnore: string[] = [
CORE_CRYPTO_ERROR_NAMES.MlsErrorDuplicateMessage,
CORE_CRYPTO_ERROR_NAMES.MlsErrorBufferedFutureMessage,
CORE_CRYPTO_ERROR_NAMES.MlsErrorUnmergedPendingGroup,
CORE_CRYPTO_ERROR_NAMES.MlsErrorOther,
];

export const shouldMLSDecryptionErrorBeIgnored = (error: unknown): error is Error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ export class MLSService extends TypedEventEmitter<Events> {

public async decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage> {
try {
const decryptedMessage = await this.coreCryptoClient.decryptMessage(conversationId, payload);
const decryptedMessage = await this.coreCryptoClient.transaction(cx =>
cx.decryptMessage(conversationId, payload),
);
this.dispatchNewCrlDistributionPoints(decryptedMessage);
return decryptedMessage;
} catch (error) {
Expand Down

0 comments on commit d7649b7

Please sign in to comment.