might be easier to use a `std::set<User>` to store the users per chat.