Merge branch 'master' into develop

This commit is contained in:
RiotRobot 2023-03-28 14:30:52 +01:00
commit 0475e7107f
15 changed files with 186 additions and 125 deletions

View file

@ -15,6 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { safeSet } from "matrix-js-sdk/src/utils";
import { SettingLevel } from "../SettingLevel";
import { WatchManager } from "../WatchManager";
import AbstractLocalStorageSettingsHandler from "./AbstractLocalStorageSettingsHandler";
@ -48,7 +50,7 @@ export default class RoomDeviceSettingsHandler extends AbstractLocalStorageSetti
let value = this.read("mx_local_settings");
if (!value) value = {};
if (!value["blacklistUnverifiedDevicesPerRoom"]) value["blacklistUnverifiedDevicesPerRoom"] = {};
value["blacklistUnverifiedDevicesPerRoom"][roomId] = newValue;
safeSet(value["blacklistUnverifiedDevicesPerRoom"], roomId, newValue);
this.setObject("mx_local_settings", value);
this.watchers.notifyUpdate(settingName, roomId, SettingLevel.ROOM_DEVICE, newValue);
return Promise.resolve();