1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00
This commit is contained in:
Bruno Windels
2019-11-15 15:18:36 +01:00
parent 264c8181c2
commit 92237f1045

View File

@@ -789,8 +789,10 @@ function useRoomPermissions(cli, room, user) {
canEdit: false,
canInvite: false,
});
const updateRoomPermissions = useCallback(async () => {
if (!room) return;
const updateRoomPermissions = useCallback(() => {
if (!room) {
return;
}
const powerLevelEvent = room.currentState.getStateEvents("m.room.power_levels", "");
if (!powerLevelEvent) return;