Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user information does not update even if client.updateUser() executed successfully in client side #133

Closed
sharifMedici opened this issue Oct 1, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@sharifMedici
Copy link

Hi i am facing a problem in getstram api (chat). when I update user information, i see client.updateUser() executed successfully. but we do not get update user information in client.user. It remain previous old information. right now i am trying to update image url. It remains the old info until we reload the whole application (cmd+R in ios, RR android simulator). but channel update work when we update channel information.

Could you please tell me what is the reason for this ?

@vishalnarkhede vishalnarkhede self-assigned this Oct 2, 2019
@aniciom
Copy link

aniciom commented Oct 2, 2019

I've no idea what might be happening, but it would be possible that the backend is collisioning with same usernames in different apps and updating them wrong? Lets say APP1 with their credentials is creating User A and APP2 with their credentials is creating the same User A, but of course in a different scope. Because in the past i've seen some strange behaviours related tothe user updating's action like this one, even when it was removed and added again. Just my 2 cents.

Cheers

@sharifMedici
Copy link
Author

sharifMedici commented Oct 2, 2019

hi thank you for your reply, there is no collisioning. all usernames are different. i strongly ask you just after client.updateUser(). did your get the update value in client.user ?

@vishalnarkhede
Copy link
Contributor

Moving this issue to stream-chat-js

@vishalnarkhede vishalnarkhede transferred this issue from GetStream/stream-chat-react-native Oct 2, 2019
@vishalnarkhede vishalnarkhede added the bug Something isn't working label Oct 2, 2019
@vishalnarkhede
Copy link
Contributor

vishalnarkhede commented Oct 10, 2019

Hey @sharifMedici This has been fixed in v1.1.5

So once you make a call to updateUser function, client will reflect the changes as soon as user.updated event is received.

@tschellenbach
Copy link
Member

tschellenbach commented Oct 10, 2019 via email

@sharifMedici
Copy link
Author

sharifMedici commented Oct 10, 2019

hi @vishalnarkhede thank for your reply i have updated now v1.1.5 . then i called client.updateUser(), i see client.user rerender but there is still remain previous old value. actually i created a property called description: "some text here" , then by client.updateUser() with some value "some text here ssss" i have updated. i see in client.user two times re-render after updateUser() but inside this client.user remain old description: "some text here". (react native , ios simulator iphone x)

@vishalnarkhede
Copy link
Contributor

Hey @sharifMedici ,

So client will have the updated value once it receives user.updated event.

client.updateUser({ id: 'user_id', description: 'New description' });
client.on('user.updated', () => {
    console.log(client.user.description); // 'New description'
})

Can you check if that works for you?

@sharifMedici
Copy link
Author

we have talked already in slacked .Thank you.

kevinnath1007 pushed a commit to kevinnath1007/stream-chat-js that referenced this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants