Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add slash command for changing room name #2401

Merged
merged 2 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/SlashCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ export const CommandMap = {
},
}),

roomname: new Command({
name: 'roomname',
args: '<name>',
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: '<user-id>',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down