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

Don't send typing notification when restoring composer draft #7477

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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