chore(spaces): fix unused variable warning in append hook
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
673813f5ae
commit
9eb2d2542a
1 changed files with 4 additions and 4 deletions
|
|
@ -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" => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue