Skip to content

NonNumeric Django UserProfile Ids fail sort on Case Sensitivity  #2492

@qwo

Description

@qwo

The users field for window.activity.presence_info is keyed by email on the recurse.zulipchat.com. When sort in activity.js is called, it creates object.keys that are case sensitive while all the emails are lower cased causing undefined lookups. Newer versions of Zulip on local dev show this is an numeric id object mapping now.

Solution, migrate or to lower all the keys in sort or migrate keys run tolower in Django.

// Recurse Zulip
{"Foo@recurse.com": {
    status: ... 
    }
}
// New zulip  
{ 1 : { 
 status: ....
   },
}

function sort_users(user_ids, presence_info) {

Edited:
Problem: Searching inUsers with the term David throws Javascript errors.
recurse.zulipchat.com throws JavaScript Errors

there are over 23 david's in the zulip chat.

screen shot 2016-11-30 at 9 59 07 pm

screen shot 2016-11-30 at 10 03 43 pm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions