From 50807d498a8559c5d533b859132fd02bc2218cbf Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 5 Nov 2017 13:06:55 -0700 Subject: [PATCH] Use settings in slash commands too Signed-off-by: Travis Ralston --- src/SlashCommands.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 82665cc2f3..344bac1ddb 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -20,6 +20,7 @@ import Tinter from "./Tinter"; import sdk from './index'; import { _t } from './languageHandler'; import Modal from './Modal'; +import SettingsStore, {SettingLevel} from "./settings/SettingsStore"; class Command { @@ -97,9 +98,7 @@ const commands = { colorScheme.secondary_color = matches[4]; } return success( - MatrixClientPeg.get().setRoomAccountData( - roomId, "org.matrix.room.color_scheme", colorScheme, - ), + SettingsStore.setValue("roomColor", roomId, SettingLevel.ROOM_ACCOUNT, colorScheme), ); } }