at long last fix bug where /op would cache previous failed attempts. fixes SYWEB-342
This commit is contained in:
+3
-1
@@ -211,7 +211,9 @@ MatrixClient.prototype.setPowerLevel = function(roomId, userId, powerLevel,
|
||||
users: {}
|
||||
};
|
||||
if (event && event.getType() === "m.room.power_levels") {
|
||||
content = event.getContent();
|
||||
// take a copy of the content to ensure we don't corrupt
|
||||
// existing client state with a failed power level change
|
||||
content = utils.deepCopy(event.getContent());
|
||||
}
|
||||
content.users[userId] = powerLevel;
|
||||
var path = utils.encodeUri("/rooms/$roomId/state/m.room.power_levels", {
|
||||
|
||||
Reference in New Issue
Block a user