Skip to content

Commit

Permalink
Fix permission detection for updating emojis (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alch-Emi authored Sep 1, 2023
1 parent 34b2901 commit 47f6c44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/molecules/room-emojis/RoomEmojis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 47f6c44

Please sign in to comment.