Hi Team,
I’m using TS sdk , 6.19.0
but while updating user displayName and avatar, I’m facing issue in updating displayName, avatar update is working fine
i checked network
this api is getting called
https://api.eu.amity.co/api/v3/users/
method put
this payload is being sent
{userId: “0x19a4c6525fe784027f5caa72748893a091077c92”, displayName: “mohit test”}
and im getting 200 response
and in user data in response, is showing changed displayName although
but when i again login to chat or refresh chat
I’m getting same old displayName
but avatar image got changed fine
@SocialPlus_Support are you checking this?
Hello, could you please confirm if you are using our UI kit? If so, what is your UI kit version?
I’m using TS sdk , 6.19.0
So you’re developing your own UI and solely utilizing our TS SDK, is that correct? If so, please help share the relevant code. Thank you.
I already shared you api , that being called
can’t you guys check that api?
these 2 methods im using
after updating user (which always get success)
when i try to get user detail again, i still old displayName data, but new image always coming
Hello, yes, we have already tested our API, and it works as expected, aligning with what you mentioned:
this payload is being sent
{userId: “0x19a4c6525fe784027f5caa72748893a091077c92”, displayName: “mohit test”}
and im getting 200 response
and in user data in response, is showing changed displayName although
Thank you for providing the code. We will forward it to the team for review, will keep you posted on any updates.
Hello @geeky_mohit , After you update the display name profile, please make sure that when you call Client.login. You pass the new display name to the function as well otherwise the display name will be replaced with the old one
const response = await Client.login(
{
userId: userId,
displayName: 'updated display name' // always pass the latest display name
},
sessionHandler,
);
so i need to pass this everytime i login?
but then how i will get correct user details if some other user is trying to get user details by userId?
@geeky_mohit Other users will always get the correct user detail because the user data is already updated successfully, but the reason that the display name is changed is because it get replaced when you call that login function with old display name.