Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
onboarding: Manage occurrence of 'help' command.
Palashe1796b0c8f9b
diff --git a/zerver/lib/onboarding.py b/zerver/lib/onboarding.pyindex afcd4eb04f7..12b3d9fff09 100644--- a/zerver/lib/onboarding.py+++ b/zerver/lib/onboarding.py@@ -93,7 +93,7 @@ def send_initial_pms(user: UserProfile) -> None:)+ "\n\n",_("Here are a few messages I understand:") + " ",- bot_commands(is_initial_pm=True),+ bot_commands(),])@@ -109,7 +109,7 @@ def send_initial_pms(user: UserProfile) -> None:)-def bot_commands(is_initial_pm: bool = False) -> str:+def bot_commands(no_help_command: bool = False) -> str:commands = ["apps","profile",@@ -119,7 +119,7 @@ def bot_commands(is_initial_pm: bool = False) -> str:"message formatting","keyboard shortcuts",]- if is_initial_pm:+ if not no_help_command:commands.append("help")return ", ".join(["`" + command + "`" for command in commands]) + "."@@ -201,7 +201,7 @@ def select_welcome_bot_response(human_response_lower: str) -> str:return "".join([_("Here are a few messages I understand:") + " ",- bot_commands() + "\n\n",+ bot_commands(no_help_command=True) + "\n\n",_("Check out our [Getting started guide](/help/getting-started-with-zulip), ""or browse the [Help center](/help/) to learn more!"diff --git a/zerver/tests/test_tutorial.py b/zerver/tests/test_tutorial.pyindex 112475a9ab2..cf9716c1f59 100644--- a/zerver/tests/test_tutorial.py+++ b/zerver/tests/test_tutorial.py@@ -159,7 +159,7 @@ class TutorialTests(ZulipTestCase):expected_response = ("I’m sorry, I did not understand your message. Please try one of the following commands: ""`apps`, `profile`, `theme`, `streams`, "- "`topics`, `message formatting`, `keyboard shortcuts`."+ "`topics`, `message formatting`, `keyboard shortcuts`, `help`.")self.assertEqual(most_recent_message(user).content, expected_response)