mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
zcommand: Strip the slash in the backend.
The slash in command is stripped in the backend, rather than in the client to make the client code cleaner. This would make client code cleaner in the slash commands which include parameters.
This commit is contained in:
@@ -65,7 +65,7 @@ exports.process = function (message_content) {
|
||||
var start_time = new Date();
|
||||
|
||||
exports.send({
|
||||
command: 'ping',
|
||||
command: content,
|
||||
on_success: function () {
|
||||
var end_time = new Date();
|
||||
var diff = end_time - start_time;
|
||||
@@ -78,12 +78,12 @@ exports.process = function (message_content) {
|
||||
}
|
||||
|
||||
if (content === '/day') {
|
||||
update_setting('day');
|
||||
update_setting(content);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content === '/night') {
|
||||
update_setting('night');
|
||||
update_setting(content);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user