From ac5d126da3edae1d7fcf25516ef2a5d0ddc71ec4 Mon Sep 17 00:00:00 2001 From: Amir Ghezelbash Date: Thu, 19 Dec 2024 20:34:40 +0330 Subject: [PATCH] chore: Add source to decryption error log (WPB-14262) (#18543) --- src/script/event/EventRepository.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/script/event/EventRepository.ts b/src/script/event/EventRepository.ts index ad04d3fab50..b3c6ea0f0a9 100644 --- a/src/script/event/EventRepository.ts +++ b/src/script/event/EventRepository.ts @@ -384,7 +384,7 @@ export class EventRepository { case EventValidation.VALID: let eventToProcess: IncomingEvent | undefined = event; if (event.type === CONVERSATION_EVENT.OTR_MESSAGE_ADD || event.type === CONVERSATION_EVENT.MLS_MESSAGE_ADD) { - eventToProcess = await this.mapEncryptedEvent(event, {decryptedData, decryptionError}); + eventToProcess = await this.mapEncryptedEvent(event, {decryptedData, decryptionError}, source); } if (!eventToProcess) { return event; @@ -397,9 +397,11 @@ export class EventRepository { private async mapEncryptedEvent( event: ConversationOtrMessageAddEvent | ConversationMLSMessageAddEvent, {decryptedData, decryptionError}: Pick, + source: EventSource, ): Promise { if (decryptionError) { this.logger.warn(`Decryption Error: '${event.type}'`, { + source, eventType: event.type, date: event.time, code: decryptionError.code,