From 9fd933a0b6c2c5ce3b0bbe42d5c363350cb7cf77 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 7 Jan 2022 11:15:20 +0000 Subject: [PATCH] Don't send typing notification when restoring composer draft (#7477) --- src/components/views/rooms/BasicMessageComposer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index f9015efdef..2d5598af92 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -234,7 +234,8 @@ export default class BasicMessageEditor extends React.Component }); this.historyManager.tryPush(this.props.model, selection, inputType, diff); - let isTyping = !this.props.model.isEmpty; + // inputType is falsy during initial mount, don't consider re-loading the draft as typing + let isTyping = !this.props.model.isEmpty && !!inputType; // If the user is entering a command, only consider them typing if it is one which sends a message into the room if (isTyping && this.props.model.parts[0].type === "command") { const { cmd } = parseCommandString(this.props.model.parts[0].text);