diff --git a/static/js/echo.js b/static/js/echo.js index baeced40ff..3cf0d41b6e 100644 --- a/static/js/echo.js +++ b/static/js/echo.js @@ -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) {