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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 13 deletions

View file

@ -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;
}