clean up
This commit is contained in:
parent
31d2a819f0
commit
ce68a5bfc8
1 changed files with 2 additions and 4 deletions
|
@ -203,17 +203,15 @@ function setBotPower(event, roomId, userId, level) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.getStateEvent(roomId, "m.room.power_levels", "").then((rawPowerState) => {
|
client.getStateEvent(roomId, "m.room.power_levels", "").then((powerLevels) => {
|
||||||
console.log(rawPowerState);
|
|
||||||
let powerEvent = new MatrixEvent(
|
let powerEvent = new MatrixEvent(
|
||||||
{
|
{
|
||||||
type: "m.room.power_levels",
|
type: "m.room.power_levels",
|
||||||
content: rawPowerState,
|
content: powerLevels,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
client.setPowerLevel(roomId, userId, level, powerEvent).done(() => {
|
client.setPowerLevel(roomId, userId, level, powerEvent).done(() => {
|
||||||
console.log('Power level has been set');
|
|
||||||
sendResponse(event, {
|
sendResponse(event, {
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue