Changes for v3.69.0

This commit is contained in:
Michael Weimann 2023-03-28 11:23:16 +01:00 committed by RiotRobot
parent 2d1d1fb585
commit c30b2637c5
13 changed files with 175 additions and 121 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();