You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
Fix invalid commands when figuring out whether to send typing notification
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -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 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") {
|
if (isTyping && this.props.model.parts[0].type === "command") {
|
||||||
const {cmd} = parseCommandString(this.props.model.parts[0].text);
|
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;
|
isTyping = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user