mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
allow editing emotes
This commit is contained in:
parent
2a7301fa8f
commit
0b17812b9c
@ -46,9 +46,12 @@ export function isContentActionable(mxEvent) {
|
||||
}
|
||||
|
||||
export function canEditContent(mxEvent) {
|
||||
return mxEvent.status !== EventStatus.CANCELLED &&
|
||||
mxEvent.getType() === 'm.room.message' &&
|
||||
mxEvent.getOriginalContent().msgtype === "m.text" &&
|
||||
if (mxEvent.status === EventStatus.CANCELLED || mxEvent.getType() !== "m.room.message") {
|
||||
return false;
|
||||
}
|
||||
const content = mxEvent.getOriginalContent();
|
||||
const {msgtype} = content;
|
||||
return (msgtype === "m.text" || msgtype === "m.emote") &&
|
||||
mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user