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

Ensure mentioned_users is array of user_ids. in updateMessage #647

Merged
merged 6 commits into from
Mar 17, 2021

Conversation

vishalnarkhede
Copy link
Contributor

@vishalnarkhede vishalnarkhede commented Mar 17, 2021

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

Slack discussion - https://getstream.slack.com/archives/C01FT5767AS/p1615968119001100

Updating pinned message fails, if there is mentioned_users in message. This is something missed in react sdk, (to ensure conversion of array of user objects to user ids). I think its better we handle it on js client as well.

Changelog

  • Extra check to see if message.mentioned_users is array of string or objects
  • Convert array of user objects to array of user ids.
  • Unit tests for the change

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2021

Size Change: +609 B (0%)

Total Size: 217 kB

Filename Size Change
dist/browser.es.js 47.2 kB +139 B (0%)
dist/browser.full-bundle.min.js 27.4 kB +46 B (0%)
dist/browser.js 47.7 kB +143 B (0%)
dist/index.es.js 47.2 kB +138 B (0%)
dist/index.js 47.7 kB +143 B (0%)

compressed-size-action

@vishalnarkhede vishalnarkhede requested review from mahboubii, AnatolyRugalev, nhannah, ferhatelmas, DanC5 and petyosi and removed request for mahboubii March 17, 2021 08:43
@vishalnarkhede vishalnarkhede force-pushed the vishal/mentioned-users branch from 7f9bbb3 to 309e965 Compare March 17, 2021 08:54
mahboubii
mahboubii previously approved these changes Mar 17, 2021
AnatolyRugalev
AnatolyRugalev previously approved these changes Mar 17, 2021
src/client.ts Outdated Show resolved Hide resolved
@vishalnarkhede vishalnarkhede dismissed stale reviews from AnatolyRugalev and mahboubii via 4b2d7b8 March 17, 2021 10:16
mahboubii
mahboubii previously approved these changes Mar 17, 2021
ferhatelmas
ferhatelmas previously approved these changes Mar 17, 2021
Copy link
Contributor

@ferhatelmas ferhatelmas left a comment

Choose a reason for hiding this comment

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

LGTM

@vishalnarkhede vishalnarkhede dismissed stale reviews from ferhatelmas and mahboubii via b2d4707 March 17, 2021 10:23
@vishalnarkhede vishalnarkhede force-pushed the vishal/mentioned-users branch from dd0500f to b2d4707 Compare March 17, 2021 10:23
Copy link
Contributor

@ferhatelmas ferhatelmas left a comment

Choose a reason for hiding this comment

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

LGTM

was forgetting only 😄

@vishalnarkhede
Copy link
Contributor Author

LGTM

was forgetting only 😄

lol yeah, thats typical "Vish" :D

@vishalnarkhede vishalnarkhede merged commit 42193b2 into master Mar 17, 2021
@vishalnarkhede vishalnarkhede deleted the vishal/mentioned-users branch March 17, 2021 10:25
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