I’m seeing some unexpected behavior when updating usernames.
When the client sends a Username update to the server I can see the new Username in the Developer Console. But if I then try to fetch the Username I get the old Username back.
If I close my app and then relaunch it, initiating a new session, my fetch will then return the updated Username.
So it appears that updating the Username takes effect immediately on the server side, but I cannot fetch the updated name until I start a new session.
This is not the case for DisplayNames. If I update the DisplayName, then fetch it immediately I get the updated value back.
I’m wondering if this is intended, or if I’m doing it wrong?
At the moment I’m working on a very lightweight app that does not store any persistent information about the user. I ask them to enter their name every time they launch the program. Since Nakama stores the original username, I just send a username update with the entered value immediately after authenticating.
I can get the behaviour I want if I update and fetch DisplayNames and then only work with DisplayNames in my UI. This is fine for now, but as I build out my architecture I want to better understand how updating UserNames work.
Am I correct in understanding that I cannot fetch an updated Username until the next session or is there something else at play here?
I’d like to “get it” so I can build around it appropriately. Thanks!