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

Commit 9fd933a

Browse files
authored
Don't send typing notification when restoring composer draft (#7477)
1 parent fed53a2 commit 9fd933a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/views/rooms/BasicMessageComposer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
234234
});
235235
this.historyManager.tryPush(this.props.model, selection, inputType, diff);
236236

237-
let isTyping = !this.props.model.isEmpty;
237+
// inputType is falsy during initial mount, don't consider re-loading the draft as typing
238+
let isTyping = !this.props.model.isEmpty && !!inputType;
238239
// If the user is entering a command, only consider them typing if it is one which sends a message into the room
239240
if (isTyping && this.props.model.parts[0].type === "command") {
240241
const { cmd } = parseCommandString(this.props.model.parts[0].text);

0 commit comments

Comments
 (0)