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

Updating client user if it user.updated event is received for that user #132

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

vishalnarkhede
Copy link
Contributor

@vishalnarkhede vishalnarkhede commented Oct 2, 2019

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

#133

@vishalnarkhede vishalnarkhede force-pushed the vishal/fixing-client-user-issue-on-update branch from 433f192 to acb8eb5 Compare October 4, 2019 13:48
test/test.js Outdated

it('should update client user', async () => {
await serverAuthClient.updateUser({
id: 'thierry2',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to generate a unique user ID (thierry2 is an admin)

@tschellenbach
Copy link
Member

tschellenbach commented Oct 4, 2019 via email

@vishalnarkhede
Copy link
Contributor Author

Remember that your own user has more fields than the user events you receive from the user updated event

On Fri, Oct 4, 2019, 08:05 Marcelo Pires @.> wrote: @.* commented on this pull request. ------------------------------ In test/test.js <#132 (comment)> : > @@ -114,6 +114,36 @@ describe('Chat', function() { }); }); }); + + it('should update client user', async () => { + await serverAuthClient.updateUser({ + id: 'thierry2', better to generate a unique user ID (thierry2 is an admin) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#132?email_source=notifications&email_token=AACAZQON66QG4SABAHD7SSTQM5ERRA5CNFSM4I4XYBE2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCG5XEXI#pullrequestreview-297497181>, or mute the thread https://github.com/notifications/unsubscribe-auth/AACAZQLNITGVSLUOL2W4JPTQM5ERRANCNFSM4I4XYBEQ .

@tschellenbach this.user = { ...this.user, ...event.user} maybe then?

@vishalnarkhede
Copy link
Contributor Author

@tschellenbach fixed :)

@tbarbugli tbarbugli merged commit 7aa2cf7 into master Oct 10, 2019
@bdandy bdandy deleted the vishal/fixing-client-user-issue-on-update branch October 15, 2019 12:00
kevinnath1007 pushed a commit to kevinnath1007/stream-chat-js that referenced this pull request Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants