typing status: Fix names "user_ids_string" that were actually arrays.

These indeed used to be strings, but were converted to arrays in
b8250fc61, and these names didn't get updated to match.

A classic example of why type-checking is a great job to get
machines to do. :-)
This commit is contained in:
Greg Price
2019-10-04 14:57:34 -07:00
committed by Tim Abbott
parent d364891894
commit 72366c8deb

View File

@@ -30,10 +30,10 @@ function get_user_ids_array() {
return people.user_ids_string_to_ids_array(user_ids_string);
}
function is_valid_conversation(user_ids_string) {
function is_valid_conversation(user_ids_array) {
// TODO: Check to make sure we're in a PM conversation
// with valid emails.
if (!user_ids_string) {
if (!user_ids_array) {
return false;
}
@@ -62,12 +62,12 @@ function get_current_time() {
return new Date().getTime();
}
function notify_server_start(user_ids_string) {
send_typing_notification_ajax(user_ids_string, "start");
function notify_server_start(user_ids_array) {
send_typing_notification_ajax(user_ids_array, "start");
}
function notify_server_stop(user_ids_string) {
send_typing_notification_ajax(user_ids_string, "stop");
function notify_server_stop(user_ids_array) {
send_typing_notification_ajax(user_ids_array, "stop");
}
exports.get_recipient = get_user_ids_array;