From 7a936798b948d8207735c958b1cbffde19601bf1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 11 Apr 2020 16:42:14 +0100 Subject: [PATCH] Fix invalid commands when figuring out whether to send typing notification Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/BasicMessageComposer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/BasicMessageComposer.js b/src/components/views/rooms/BasicMessageComposer.js index a9389400ef..2e4a966404 100644 --- a/src/components/views/rooms/BasicMessageComposer.js +++ b/src/components/views/rooms/BasicMessageComposer.js @@ -170,7 +170,7 @@ export default class BasicMessageEditor extends React.Component { // 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); - if (CommandMap.get(cmd).category !== CommandCategories.messages) { + if (!CommandMap.has(cmd) || CommandMap.get(cmd).category !== CommandCategories.messages) { isTyping = false; } }