Remove /encrypt command

Now that we have the room setting to enable encryption, the /encrypt command is
not only redundant, but confusing, since it's in conflict with the room
setting.
This commit is contained in:
Richard van der Hoff 2016-06-23 13:21:55 +01:00
parent 38a1a0b30f
commit 6283b200fb
2 changed files with 1 additions and 59 deletions

View file

@ -17,7 +17,6 @@ limitations under the License.
var MatrixClientPeg = require("./MatrixClientPeg");
var MatrixTools = require("./MatrixTools");
var dis = require("./dispatcher");
var encryption = require("./encryption");
var Tinter = require("./Tinter");
@ -82,32 +81,13 @@ var commands = {
return success(
MatrixClientPeg.get().setRoomAccountData(
room_id, "org.matrix.room.color_scheme", colorScheme
)
)
);
}
}
return reject(this.getUsage());
}),
encrypt: new Command("encrypt", "<on|off>", function(room_id, args) {
if (args == "on") {
var client = MatrixClientPeg.get();
var members = client.getRoom(room_id).currentState.members;
var user_ids = Object.keys(members);
return success(
encryption.enableEncryption(client, room_id, user_ids)
);
}
if (args == "off") {
var client = MatrixClientPeg.get();
return success(
encryption.disableEncryption(client, room_id)
);
}
return reject(this.getUsage());
}),
// Change the room topic
topic: new Command("topic", "<topic>", function(room_id, args) {
if (args) {