mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
tutorial: don't let punctuation get in the way of exiting.
(imported from commit 7b97f382684bd2ddb92fc3efa6e1a635c4662aef)
This commit is contained in:
@@ -61,7 +61,8 @@ function any_message_to_me(message) {
|
||||
|
||||
var received_messages = [];
|
||||
exports.message_was_sent = function(message) {
|
||||
var trimmed_content = message.content.trim().toLowerCase();
|
||||
// Don't let casing or stray punctuation get in the way.
|
||||
var trimmed_content = message.content.substring(0, 4).toLowerCase();
|
||||
if (any_message_to_me(message) &&
|
||||
(trimmed_content === 'exit' || trimmed_content === 'stop')) {
|
||||
sleep(1000).then(function () {
|
||||
|
||||
Reference in New Issue
Block a user