From 9b6ef8af721c5cc30c4843c94ee78b56436510a6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 17 Jan 2019 15:59:05 -0700 Subject: [PATCH] Add an /upgraderoom command to make upgrading easier for development --- src/SlashCommands.js | 12 ++++++++++++ src/i18n/strings/en_EN.json | 1 + 2 files changed, 13 insertions(+) diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 47c6c26b45..b9fc4e4334 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -86,6 +86,18 @@ export const CommandMap = { hideCompletionAfterSpace: true, }), + upgraderoom: new Command({ + name: 'upgraderoom', + args: '', + description: _td('Upgrades a room to a new version'), + runFn: function(roomId, args) { + if (args) { + return success(MatrixClientPeg.get().upgradeRoom(roomId, args)); + } + return reject(this.getUsage()); + }, + }), + nick: new Command({ name: 'nick', args: '', diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ef0ff1ebf7..eb353f2508 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -130,6 +130,7 @@ "Searches DuckDuckGo for results": "Searches DuckDuckGo for results", "/ddg is not a command": "/ddg is not a command", "To use it, just wait for autocomplete results to load and tab through them.": "To use it, just wait for autocomplete results to load and tab through them.", + "Upgrades a room to a new version": "Upgrades a room to a new version", "Changes your display nickname": "Changes your display nickname", "Changes colour scheme of current room": "Changes colour scheme of current room", "Sets the room topic": "Sets the room topic",