mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
slash-commands: Suppress local echo for slash commands.
This commit is contained in:
@@ -93,6 +93,11 @@ function insert_local_message(message_request, local_id) {
|
||||
return message.local_id;
|
||||
}
|
||||
|
||||
exports.is_slash_command = function (content) {
|
||||
return !content.startsWith('/me') && content.startsWith('/');
|
||||
};
|
||||
|
||||
|
||||
exports.try_deliver_locally = function try_deliver_locally(message_request) {
|
||||
if (markdown.contains_backend_only_syntax(message_request.content)) {
|
||||
return;
|
||||
@@ -102,6 +107,10 @@ exports.try_deliver_locally = function try_deliver_locally(message_request) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (exports.is_slash_command(message_request.content)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var next_local_id = local_message.get_next_id();
|
||||
|
||||
if (!next_local_id) {
|
||||
|
||||
Reference in New Issue
Block a user