Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Don't send typing notification when restoring composer draft (#7477)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Jan 7, 2022
1 parent fed53a2 commit 9fd933a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/views/rooms/BasicMessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
});
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);
Expand Down

0 comments on commit 9fd933a

Please sign in to comment.