mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
This commit contains a few clean ups: * In order to scale better for adding multiple commands, the message formatting and setting switch logic was extracted to its own function. * The command lists were removed, as the frontend parses the slash command from the compose box, and only sends a single command to the backend for any given command alias typed. * The `switch_command` logic was removed because, given the aforementioned fact, the index of the command will always be the same. Thus the switch command will always be the same. * Switched to using early returns as opposed to nested conditionals. Along with removing single use variable declarations.
1.8 KiB
1.8 KiB