diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 24328d6372..f4a9f9d5ff 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -135,6 +135,18 @@ export const CommandMap = { }, }), + name: new Command({ + name: 'name', + args: '', + description: _td('Sets the room name'), + runFn: function(roomId, args) { + if (args) { + return success(MatrixClientPeg.get().setRoomName(roomId, args)); + } + return reject(this.getUsage()); + }, + }), + invite: new Command({ name: 'invite', args: '', diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ef659bf566..1271934b63 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -133,6 +133,7 @@ "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", + "Sets the room name": "Sets the room name", "Invites user with given id to current room": "Invites user with given id to current room", "Joins room with given alias": "Joins room with given alias", "Leave room": "Leave room", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index b96a49eac7..5e09f1d860 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -677,6 +677,7 @@ "Integrations Error": "Integrations Error", "NOTE: Apps are not end-to-end encrypted": "NOTE: Apps are not end-to-end encrypted", "Sets the room topic": "Sets the room topic", + "Sets the room name": "Sets the room name", "The maximum permitted number of widgets have already been added to this room.": "The maximum permitted number of widgets have already been added to this room.", "To get started, please pick a username!": "To get started, please pick a username!", "Unable to create widget.": "Unable to create widget.",