dont show edit button for messages that are not your own
This commit is contained in:
parent
52c4d7b6b0
commit
b081a3156f
2 changed files with 13 additions and 7 deletions
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { EventStatus } from 'matrix-js-sdk';
|
||||
import MatrixClientPeg from '../MatrixClientPeg';
|
||||
|
||||
/**
|
||||
* Returns whether an event should allow actions like reply, reactions, edit, etc.
|
||||
|
@ -43,3 +44,8 @@ export function isContentActionable(mxEvent) {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function canEditContent(mxEvent) {
|
||||
return isContentActionable(mxEvent) &&
|
||||
mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue