Skip to content

fix: add user to RESERVED_UPDATED_MESSAGE_FIELDS #1526

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

arnautov-anton
Copy link
Contributor

@arnautov-anton arnautov-anton commented May 7, 2025

Description of the changes, What, Why and How?

Update fails if the payload contains both user object and user_idproperty.

StreamChat error code 4: UpdateMessage failed with error: "cannot set both message.user and message.user_id."

Copy link
Contributor

github-actions bot commented May 7, 2025

Size Change: -10 B (0%)

Total Size: 377 kB

Filename Size Change
dist/cjs/index.browser.cjs 107 kB -3 B (0%)
dist/cjs/index.node.cjs 151 kB -4 B (0%)
dist/esm/index.js 120 kB -3 B (0%)

compressed-size-action

@arnautov-anton arnautov-anton force-pushed the fix/filter-user-from-update-message-payload branch from d196be6 to ce787da Compare May 7, 2025 15:22
type: true,
html: true,
__html: true,
user: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

📝

@@ -384,7 +384,6 @@ export const toUpdatedMessagePayload = (
mentioned_users: message.mentioned_users?.map((user) =>
typeof user === 'string' ? user : user.id,
),
user_id: message.user?.id ?? message.user_id,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

📝

@arnautov-anton arnautov-anton merged commit 63b6b82 into master May 7, 2025
4 checks passed
@arnautov-anton arnautov-anton deleted the fix/filter-user-from-update-message-payload branch May 7, 2025 15:50
github-actions bot pushed a commit that referenced this pull request May 7, 2025
## [9.0.1](v9.0.0...v9.0.1) (2025-05-07)

### Bug Fixes

* add user to RESERVED_UPDATED_MESSAGE_FIELDS ([#1526](#1526)) ([63b6b82](63b6b82))
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants