Skip to content

Conversation

@pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Apr 7, 2025

Proposed changes (including videos or screenshots)

Issue(s)

When we invite an user from a federated workspace, we only have their username available, not the display name. In this situation, synaptic tries to get the user's profile from the remote synaptic, who will not have the data ready if that user had never federated before. In this case synaptic falls back to using the username as display name and passes that information to us as if it were the target user's real display name.

When we pre-create the federated users on all sides, we'll already have their display name properly assigned, but this username coming from synaptic ends up overwriting it.

Steps to test or reproduce

Further comments

CORE-1071


This pull request addresses an issue in the Rocket.Chat repository where federated users' display names were being overwritten by their usernames. The changes include a more detailed implementation of the shouldUpdateDisplayName method in the FederatedUser class, which now includes specific conditions to determine when a user's display name should be updated. This fix ensures that the display names of federated users are preserved appropriately. The changes are proposed from the fix/federation-overwrite-display-name branch to the develop branch.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Apr 7, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2025

🦋 Changeset detected

Latest commit: d8e57d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pierre-lehnen-rc pierre-lehnen-rc added this to the 7.6.0 milestone Apr 7, 2025
@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review April 7, 2025 20:31
@pierre-lehnen-rc pierre-lehnen-rc requested a review from a team as a code owner April 7, 2025 20:31
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35716/

Built to branch gh-pages at 2025-04-14 18:54 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 59.62%. Comparing base (ba78cbe) to head (d8e57d3).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #35716   +/-   ##
========================================
  Coverage    59.62%   59.62%           
========================================
  Files         2832     2832           
  Lines        68356    68362    +6     
  Branches     15141    15150    +9     
========================================
+ Hits         40754    40758    +4     
- Misses       24995    24996    +1     
- Partials      2607     2608    +1     
Flag Coverage Δ
unit 75.49% <71.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

debdutdeb
debdutdeb previously approved these changes Apr 9, 2025
Copy link
Member

@debdutdeb debdutdeb left a comment

Choose a reason for hiding this comment

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

ok to approve, just one question mostly but don't think that'll be a big deal.

@pierre-lehnen-rc pierre-lehnen-rc added the stat: QA assured Means it has been tested and approved by a company insider label Apr 10, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 10, 2025
@kody-ai
Copy link

kody-ai bot commented Apr 14, 2025

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security
Code Style
Kody Rules
Refactoring
Error Handling
Maintainability
Potential Issues
Documentation And Comments
Performance And Optimization
Breaking Changes

Access your configuration settings here.

@kodiakhq kodiakhq bot merged commit 56a15e8 into develop Apr 14, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/federation-overwrite-display-name branch April 14, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants