From cde18616551d8dc719e7914b9e9ab1dfa175564f Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 22 Mar 2017 06:31:44 -0700 Subject: [PATCH] typing indicators: Validate PM emails. --- static/js/typing.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/js/typing.js b/static/js/typing.js index 962ddbb527..c6a989029d 100644 --- a/static/js/typing.js +++ b/static/js/typing.js @@ -52,6 +52,14 @@ function is_valid_conversation(recipient) { return false; } + if (compose.get_invalid_recipient_emails().length > 0) { + // If we have invalid recipient emails, it's highly + // likely the user is either still deciding who to + // compose to, or is confused. Also, the server + // will just reject our requests. + return false; + } + return true; }