Make local echo work for threads (#7157)

This commit is contained in:
Germain 2021-11-24 08:40:15 +00:00 committed by GitHub
parent 7f350ae0f4
commit 392c4ad8d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 5 deletions

View file

@ -426,7 +426,11 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
}
if (shouldSend) {
this.cancelPreviousPendingEdit();
const prom = this.props.mxClient.sendMessage(roomId, editContent);
const event = this.props.editState.getEvent();
const threadId = event.threadRootId || null;
const prom = this.props.mxClient.sendMessage(roomId, threadId, editContent);
this.clearStoredEditorState();
dis.dispatch({ action: "message_sent" });
CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, true, false, editContent);