There is no JS API to set the trusted usernames for security reasons.
These are determined by the user's authentication with the server and
broadcast by the trusted server to all users in a session. If there
were a JS API to set trusted usernames, any user could spoof any other
user's name. For example, I could invoke the method to say I'm "navid"
and no one would be the wiser.
If you want to use untrusted usernames in your app, sync them like any
other data and include them in the state for late joiners.
Pete
--
Pete