Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3596 from matrix-org/dbkr/fix_editing_softcrash
Browse files Browse the repository at this point in the history
Fix softcrash if editing silly events
  • Loading branch information
dbkr authored Nov 6, 2019
2 parents d14c0c3 + 0464b09 commit e2acc90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/EventUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit e2acc90

Please sign in to comment.