Skip to content

fix: add user to RESERVED_UPDATED_MESSAGE_FIELDS#1526

Merged
arnautov-anton merged 2 commits intomasterfrom
fix/filter-user-from-update-message-payload
May 7, 2025
Merged

fix: add user to RESERVED_UPDATED_MESSAGE_FIELDS#1526
arnautov-anton merged 2 commits intomasterfrom
fix/filter-user-from-update-message-payload

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."

@github-actions
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.

📝

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