Merge pull request #2988 from matrix-org/bwindels/donteditimages

Message editing: only allow editing of text messages
pull/21833/head
Bruno Windels 2019-05-17 09:40:10 +00:00 committed by GitHub
commit 4bfa385b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -47,5 +47,6 @@ export function isContentActionable(mxEvent) {
export function canEditContent(mxEvent) { export function canEditContent(mxEvent) {
return isContentActionable(mxEvent) && return isContentActionable(mxEvent) &&
mxEvent.getContent().msgtype === "m.text" &&
mxEvent.getSender() === MatrixClientPeg.get().getUserId(); mxEvent.getSender() === MatrixClientPeg.get().getUserId();
} }