diff --git a/src/service/rooms/timeline/append.rs b/src/service/rooms/timeline/append.rs index 89eedfd9..e657575d 100644 --- a/src/service/rooms/timeline/append.rs +++ b/src/service/rooms/timeline/append.rs @@ -127,7 +127,7 @@ where // Make unsigned fields correct. This is not properly documented in the spec, // but state events need to have previous content in the unsigned field, so // clients can easily interpret things like membership changes - if let Some(state_key) = pdu.state_key() { + if let Some(_state_key) = pdu.state_key() { if let CanonicalJsonValue::Object(unsigned) = pdu_json .entry("unsigned".to_owned()) .or_insert_with(|| CanonicalJsonValue::Object(BTreeMap::default())) @@ -226,7 +226,7 @@ where let mut highlights = Vec::with_capacity(push_target.len().saturating_add(1)); if *pdu.kind() == TimelineEventType::RoomMember { - if let Some(state_key) = pdu.state_key() { + if let Some(_state_key) = pdu.state_key() { let target_user_id = UserId::parse(state_key)?; if self.services.users.is_active_local(target_user_id).await { @@ -336,7 +336,7 @@ where .remove(room_id); }, | TimelineEventType::RoomMember => { - if let Some(state_key) = pdu.state_key() { + if let Some(_state_key) = pdu.state_key() { // if the state_key fails let target_user_id = UserId::parse(state_key).expect("This state_key was previously validated"); @@ -361,7 +361,7 @@ where // Space permission cascading: react to role-related state events if self.services.roles.is_enabled() { - if let Some(state_key) = pdu.state_key() { + if let Some(_state_key) = pdu.state_key() { let event_type_str = pdu.event_type().to_string(); match event_type_str.as_str() { | "m.space.roles" | "m.space.role.member" | "m.space.role.room" => {