mirror of https://github.com/zulip/zulip.git
tutorial: don't let punctuation get in the way of exiting.
(imported from commit 7b97f382684bd2ddb92fc3efa6e1a635c4662aef)
This commit is contained in:
parent
a76977f57f
commit
3945335e6e
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue