Merge pull request #3596 from matrix-org/dbkr/fix_editing_softcrash
Fix softcrash if editing silly events
This commit is contained in:
@@ -52,6 +52,7 @@ export function canEditContent(mxEvent) {
|
||||
const content = mxEvent.getOriginalContent();
|
||||
const {msgtype} = content;
|
||||
return (msgtype === "m.text" || msgtype === "m.emote") &&
|
||||
content.body && typeof content.body === 'string' &&
|
||||
mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user