fix(federation-matrix): skip avatar reset when avatar_url is missing#39933
fix(federation-matrix): skip avatar reset when avatar_url is missing#39933Nainsi364 wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (6)📓 Common learnings📚 Learning: 2026-03-20T13:51:23.302ZApplied to files:
📚 Learning: 2025-10-28T16:53:42.761ZApplied to files:
📚 Learning: 2025-12-09T20:01:00.324ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
🔇 Additional comments (1)
WalkthroughIn the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi, I’ve updated the PR title to follow the contribution guidelines. Please let me know if any further changes are needed. |
Summary
Prevents federated user avatars from being reset when processing Matrix membership/join events that do not explicitly include
avatar_url.Closes #39909
Problem
Previously, when
avatar_urlwas missing from a Matrix membership event, it was treated asnull, causing Rocket.Chat to reset the user's avatar.This is incorrect because:
Fix
Avatar updates are now processed only when the event explicitly includes the
avatar_urlfield.This ensures:
avatar_urlno longer causes unintended avatar resetTesting
avatar_urlis presentavatar_urlis explicitly nullavatar_urlis missingSummary by CodeRabbit
Bug Fixes