From 4d7b5cd072bdfb10cae2042bd98f283af7d7328f Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Thu, 9 Mar 2023 12:52:40 -0500 Subject: [PATCH] Adds some logging around draft clearing --- ts/models/conversations.ts | 3 +++ ts/state/ducks/composer.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 3f0fd630f..a4f7d6333 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -4205,6 +4205,9 @@ export class ConversationModel extends window.Backbone this.doAddSingleMessage(model, { isJustSent: true }); + log.info( + `enqueueMessageForSend(${this.idForLogging()}): clearDraft(${!dontClearDraft})` + ); const draftProperties = dontClearDraft ? {} : { diff --git a/ts/state/ducks/composer.ts b/ts/state/ducks/composer.ts index 693088e80..79cdd5f52 100644 --- a/ts/state/ducks/composer.ts +++ b/ts/state/ducks/composer.ts @@ -1147,6 +1147,7 @@ function saveDraft( } if (messageText !== conversation.get('draft')) { + log.info(`saveDraft(${conversation.idForLogging()})`); const now = Date.now(); let activeAt = conversation.get('active_at'); let timestamp = conversation.get('timestamp');