typeahead: Add /settings slash command.

This commit is contained in:
neiljp (Neil Pilgrim)
2020-09-18 00:20:32 +00:00
committed by Tim Abbott
parent ef19e4870d
commit ec60b1e757
2 changed files with 10 additions and 0 deletions

View File

@@ -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]);

View File

@@ -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) {