Ok, I understand the motivation now, but this approach is still racy as hell as there is no guarantee in what order this happens because they are independent threads. Chats are always sorted alphabetically (by their ID currently, but should be name btw) regardless in which order they were created. If this does not happen for you then it is a bug which this shouldn't try to workaround.