typing status: Cut unconverted_data conditional.

Returning true from this function means we go on to send, or extend
the lifetime of, a typing notification; returning false means we don't.

It's hard to see why having a partially-entered name in the recipient
box should mean we're *more* inclined to send a typing notification to
the set of recipients that are already entered; if anything, it seems
like it should make us *less* inclined to do so.  So we're better off
without this conditional.

The conditional was introduced in commit 72295e94b, as part of a
conversion from user emails to user IDs; there, it seems to replace a
condition that went in the opposite direction, returning *false* if
there were any invalid emails in the recipient box.  So perhaps it's
just inverted.

Moreover, the (re-)inverted version would also be wrong: if the user
is typing a PM addressed to some users, and they hit send, the message
will go to those users whether or not they have any unconverted text
in the recipients box.  So the typing notifications should too.
This commit is contained in:
Greg Price
2019-10-08 16:33:07 -07:00
parent e42c3f7418
commit 3bdd741852

View File

@@ -39,10 +39,6 @@ function is_valid_conversation(user_ids_array) {
return false;
}
if (compose_pm_pill.has_unconverted_data()) {
return true;
}
var compose_empty = !compose_state.has_message_content();
if (compose_empty) {
return false;