mirror of https://github.com/vector-im/riot-web
Merge pull request #3596 from matrix-org/dbkr/fix_editing_softcrash
Fix softcrash if editing silly eventspull/21833/head
commit
e2acc90fbf
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue