Fix composer localStorage key for draft event in a thread (#7526)

This commit is contained in:
Germain
2022-01-12 17:13:47 +00:00
committed by GitHub
parent 9ca429d15c
commit 61116377f3
2 changed files with 7 additions and 13 deletions
@@ -451,9 +451,8 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
private get editorStateKey() {
let key = `mx_cider_state_${this.props.room.roomId}`;
const thread = this.props.replyToEvent?.getThread();
if (thread) {
key += `_${thread.id}`;
if (this.props.relation?.rel_type === RelationType.Thread) {
key += `_${this.props.relation.event_id}`;
}
return key;
}