Get rid of match on membership change in RoomMember::update_profile.
The calling method already did this when it determined that update_profile should be called so we don't need to repeat it.master
parent
5ef9a7b924
commit
9bd8699e18
|
@ -117,20 +117,11 @@ impl RoomMember {
|
|||
|
||||
/// Handle profile updates.
|
||||
pub(crate) fn update_profile(&mut self, event: &MemberEvent) -> bool {
|
||||
use MembershipChange::*;
|
||||
|
||||
match event.membership_change() {
|
||||
ProfileChanged => {
|
||||
self.display_name = event.content.displayname.clone();
|
||||
self.avatar_url = event.content.avatar_url.clone();
|
||||
true
|
||||
}
|
||||
|
||||
// We're only interested in profile changes here.
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_power(&mut self, event: &PowerLevelsEvent, max_power: Int) -> bool {
|
||||
let changed;
|
||||
if let Some(user_power) = event.content.users.get(&self.user_id) {
|
||||
|
|
Loading…
Reference in New Issue