js: Use IntDict in people.js.

This required lots of manual testing:

    - search/navigate user presence
    - send PM and mention user
    - pay attention to compose fade
    - send stream msg and mention user
    - open Private Messages in top-left and click
    - test unread counts
    - invite user who already has account
    - search for users in search bar
    - check user settings
        - User Groups
        - Users
        - Deactivated Users
        - Bots
    - create a bot
    - mention user groups
    - send group PM then click on lower right
    - view/edit/create streams

If there are still pieces of code that don't convert
ids to ints, the code should still work but report
blueslip errors.

I try to mostly convert user_ids to ints in the callers,
since often the callers are dealing with small amounts
of data, like user ids from huddles.
This commit is contained in:
Steve Howell
2019-12-29 14:07:05 +00:00
committed by Tim Abbott
parent 4e59937632
commit 7630b859c3
10 changed files with 45 additions and 38 deletions

View File

@@ -90,7 +90,8 @@ exports._build_private_messages_list = function (active_conversation) {
user_circle_class = 'user_circle_fraction';
fraction_present = buddy_data.huddle_fraction_present(user_ids_string);
} else {
const recipient_user_obj = people.get_person_from_user_id(user_ids_string);
const user_id = parseInt(user_ids_string, 10);
const recipient_user_obj = people.get_person_from_user_id(user_id);
if (recipient_user_obj.is_bot) {
user_circle_class = 'user_circle_green';