Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

typeahead: Add `/settings` slash command.

neiljp (Neil Pilgrim)ec60b1e75735
diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.js
index a88fce49af6..554abeaffd3 100644
--- a/frontend_tests/node_tests/composebox_typeahead.js
+++ b/frontend_tests/node_tests/composebox_typeahead.js
@@ -138,6 +138,11 @@ const my_slash = {
text: "translated: /my (Test)",
};
+const settings_slash = {
+ name: "settings",
+ text: "translated: /settings (Load settings menu)",
+};
+
const sweden_stream = {
name: "Sweden",
description: "Cold, mountains and home decor.",
@@ -1490,6 +1495,7 @@ run_test("typeahead_results", () => {
// Autocomplete by slash commands.
assert_slash_matches("me", [me_slash]);
+ assert_slash_matches("settings", [settings_slash]);
// Autocomplete stream by stream name or stream description.
assert_stream_matches("den", [denmark_stream, sweden_stream]);
diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js
index 3610625587c..a44157c842d 100644
--- a/static/js/composebox_typeahead.js
+++ b/static/js/composebox_typeahead.js
@@ -386,6 +386,10 @@ exports.slash_commands = [
text: i18n.t("/poll Where should we go to lunch today? (Create a poll)"),
name: "poll",
},
+ {
+ text: i18n.t("/settings (Load settings menu)"),
+ name: "settings",
+ },
];
exports.filter_and_sort_mentions = function (is_silent, query, opts) {