Fix permission detection for updating emojis (#1125)

This commit is contained in:
Emi 2023-09-01 00:49:34 -04:00 committed by GitHub
parent 34b2901566
commit 47f6c44c17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,8 +80,7 @@ function RoomEmojis({ roomId }) {
const { usablePacks, createPack, deletePack } = useRoomPacks(room);
const myPowerlevel = room.getMember(mx.getUserId())?.powerLevel || 0;
const canChange = room.currentState.hasSufficientPowerLevelFor('state_default', myPowerlevel);
const canChange = room.currentState.maySendStateEvent('im.ponies.room_emote', mx.getUserId());
const handlePackCreate = (e) => {
e.preventDefault();