mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +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;
|
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) {
|
exports.try_deliver_locally = function try_deliver_locally(message_request) {
|
||||||
if (markdown.contains_backend_only_syntax(message_request.content)) {
|
if (markdown.contains_backend_only_syntax(message_request.content)) {
|
||||||
return;
|
return;
|
||||||
@@ -102,6 +107,10 @@ exports.try_deliver_locally = function try_deliver_locally(message_request) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (exports.is_slash_command(message_request.content)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var next_local_id = local_message.get_next_id();
|
var next_local_id = local_message.get_next_id();
|
||||||
|
|
||||||
if (!next_local_id) {
|
if (!next_local_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user