Fix permission detection for updating emojis (#1125)
This commit is contained in:
parent
34b2901566
commit
47f6c44c17
1 changed files with 1 additions and 2 deletions
|
@ -80,8 +80,7 @@ function RoomEmojis({ roomId }) {
|
||||||
|
|
||||||
const { usablePacks, createPack, deletePack } = useRoomPacks(room);
|
const { usablePacks, createPack, deletePack } = useRoomPacks(room);
|
||||||
|
|
||||||
const myPowerlevel = room.getMember(mx.getUserId())?.powerLevel || 0;
|
const canChange = room.currentState.maySendStateEvent('im.ponies.room_emote', mx.getUserId());
|
||||||
const canChange = room.currentState.hasSufficientPowerLevelFor('state_default', myPowerlevel);
|
|
||||||
|
|
||||||
const handlePackCreate = (e) => {
|
const handlePackCreate = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue