Add SettingsLevel enum; Move settings to own file.

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-11-03 23:19:45 -06:00
parent 893c39bfbe
commit 8282534f87
16 changed files with 259 additions and 213 deletions

View file

@ -46,11 +46,14 @@ export default class RoomAccountSettingsHandler extends SettingsHandler {
canSetValue(settingName, roomId) {
const room = MatrixClientPeg.get().getRoom(roomId);
return !!room; // If they have the room, they can set their own account data
// If they have the room, they can set their own account data
return room !== undefined && room !== null;
}
isSupported() {
return !!MatrixClientPeg.get();
const cli = MatrixClientPeg.get();
return cli !== undefined && cli !== null;
}
_getSettings(roomId, eventType = "im.vector.settings") {