Skip to content

Conversation

@pixlwave
Copy link
Member

@pixlwave pixlwave commented Dec 19, 2025

I've wanted to add this for ages now… This PR lets clients implement e.g. the /myroomnick slash command.

🎄🎁

@pixlwave pixlwave requested a review from a team as a code owner December 19, 2025 19:19
@pixlwave pixlwave requested review from stefanceriu and removed request for a team December 19, 2025 19:19
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 19, 2025

CodSpeed Performance Report

Merging #5981 will not alter performance

Comparing doug/ffi-room-nick (65e19c9) with main (cd9f433)

Summary

✅ 50 untouched

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.58%. Comparing base (cd9f433) to head (65e19c9).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/room/mod.rs 72.22% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5981      +/-   ##
==========================================
- Coverage   88.59%   88.58%   -0.01%     
==========================================
  Files         364      364              
  Lines      104341   104359      +18     
  Branches   104341   104359      +18     
==========================================
+ Hits        92438    92451      +13     
- Misses       7537     7542       +5     
  Partials     4366     4366              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +1124 to +1130
let Some(member_event) = member_event else {
return Err(Error::InsufficientData);
};

let RawSyncOrStrippedState::Sync(raw_event) = member_event else {
return Err(Error::InsufficientData);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two checks can be collapsed into a single one.


let event = raw_event.deserialize()?;

let SyncStateEvent::Original(ev) = event else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having a redacted event shouldn't prevent from changing the display name. We can create a new RoomMemberEventContent with the same membership.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants