update setPowerLevel usage

This commit is contained in:
Ajay Bura 2024-09-02 15:20:10 +05:30
parent b5dbb018a3
commit f8053c8eac

View file

@ -244,11 +244,7 @@ async function unignore(mx, userIds) {
} }
async function setPowerLevel(mx, roomId, userId, powerLevel) { async function setPowerLevel(mx, roomId, userId, powerLevel) {
const room = mx.getRoom(roomId); const result = await mx.setPowerLevel(roomId, userId, powerLevel);
const powerlevelEvent = room.currentState.getStateEvents('m.room.power_levels')[0];
const result = await mx.setPowerLevel(roomId, userId, powerLevel, powerlevelEvent);
return result; return result;
} }