From e8392dfa0093466a708a3a14ba8da576469e6c60 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 25 Dec 2017 13:39:32 -0700 Subject: [PATCH] Have /tint use the primary color as the secondary if no secondary was given This is to make the color scheme actually apply itself now that the secondary color is not optional. In order to preserve it being optional in the command, we'll use the primary color as the secondary color as it has no major visual impact. Signed-off-by: Travis Ralston --- src/SlashCommands.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 344bac1ddb..4e711d6f44 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -96,6 +96,8 @@ const commands = { colorScheme.primary_color = matches[1]; if (matches[4]) { colorScheme.secondary_color = matches[4]; + } else { + colorScheme.secondary_color = colorScheme.primary_color; } return success( SettingsStore.setValue("roomColor", roomId, SettingLevel.ROOM_ACCOUNT, colorScheme),