mirror of https://github.com/vector-im/riot-web
clean up
parent
31d2a819f0
commit
ce68a5bfc8
|
@ -203,17 +203,15 @@ function setBotPower(event, roomId, userId, level) {
|
|||
return;
|
||||
}
|
||||
|
||||
client.getStateEvent(roomId, "m.room.power_levels", "").then((rawPowerState) => {
|
||||
console.log(rawPowerState);
|
||||
client.getStateEvent(roomId, "m.room.power_levels", "").then((powerLevels) => {
|
||||
let powerEvent = new MatrixEvent(
|
||||
{
|
||||
type: "m.room.power_levels",
|
||||
content: rawPowerState,
|
||||
content: powerLevels,
|
||||
}
|
||||
);
|
||||
|
||||
client.setPowerLevel(roomId, userId, level, powerEvent).done(() => {
|
||||
console.log('Power level has been set');
|
||||
sendResponse(event, {
|
||||
success: true,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue