-
Notifications
You must be signed in to change notification settings - Fork 362
Room: Add a method to set your own user's display name within a room #5981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b0c1a9a to
39ff559
Compare
For e.g. the /myroomnick slash command.
39ff559 to
65e19c9
Compare
CodSpeed Performance ReportMerging #5981 will not alter performanceComparing Summary
|
Codecov Report❌ Patch coverage is
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. |
| let Some(member_event) = member_event else { | ||
| return Err(Error::InsufficientData); | ||
| }; | ||
|
|
||
| let RawSyncOrStrippedState::Sync(raw_event) = member_event else { | ||
| return Err(Error::InsufficientData); | ||
| }; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
I've wanted to add this for ages now… This PR lets clients implement e.g. the
/myroomnickslash command.🎄🎁