From 47f6c44c17dcf2c03e3ce0cbd8fd352069560556 Mon Sep 17 00:00:00 2001 From: Emi Date: Fri, 1 Sep 2023 00:49:34 -0400 Subject: [PATCH] Fix permission detection for updating emojis (#1125) --- src/app/molecules/room-emojis/RoomEmojis.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/molecules/room-emojis/RoomEmojis.jsx b/src/app/molecules/room-emojis/RoomEmojis.jsx index 81cee0a..94ae610 100644 --- a/src/app/molecules/room-emojis/RoomEmojis.jsx +++ b/src/app/molecules/room-emojis/RoomEmojis.jsx @@ -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();