feat: Add Matrix federation support for updating user profiles

KR
3mo ago
+60-2

Proposed changes (including videos or screenshots)

Implemented setUserProfile support for Matrix federation.

This adds the ability to update a user's profile information (currently avatar URL) through the Matrix profile API and propagate the update to federated rooms using FederationMatrix.setUserProfile.

Changes made:

  • Added setUserProfile method to IFederationMatrixService.
  • Implemented setUserProfile in FederationMatrix to update room membership events with profile data.
  • Updated Matrix profile avatar update endpoint to use the new SDK/service method instead of returning notImplemented.

Issue(s)

Closes #41446

Steps to test or reproduce

  1. Configure Matrix federation.
  2. Update a federated user's profile avatar URL through the Matrix profile endpoint.
  3. Verify that the profile update is propagated to the federated rooms.

Further comments

This implementation follows the existing updateUserName flow by finding the user's joined federated rooms and sending membership updates through the federation SDK.

Summary by CodeRabbit

  • New Features
    • Added support for updating federated Matrix user profiles with display names and avatar URLs.
    • Avatar profile updates now complete successfully instead of returning an unsupported-operation error.
    • Profile changes are applied across the user’s joined federated rooms.
    • Updates support optional display names and nullable avatar URLs, with successful requests returning an empty response.