mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
chore: Clippy fixes
This commit is contained in:
@@ -1196,10 +1196,11 @@
|
|||||||
#
|
#
|
||||||
#typing_client_timeout_max_s = 45
|
#typing_client_timeout_max_s = 45
|
||||||
|
|
||||||
# The maximum number of events to send at once for non-limited legacy syncs.
|
# The maximum number of events to send at once for non-limited legacy
|
||||||
# Has no effect on sliding sync. This parameter also affects how many messages from each room
|
# syncs. Has no effect on sliding sync. This parameter also affects how
|
||||||
# are sent to the client on initial syncs, and larger values will make initial syncs slower.
|
# many messages from each room are sent to the client on initial syncs;
|
||||||
# The default of 10 is reasonable for most use cases.
|
# larger values will make initial syncs slower. The default of 10 is
|
||||||
|
# reasonable for most use cases.
|
||||||
#
|
#
|
||||||
#incremental_sync_max_timeline_size = 10
|
#incremental_sync_max_timeline_size = 10
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,11 @@ pub(super) async fn load_left_room(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref leave_pdu) = leave_pdu {
|
if let Some(ref leave_pdu) = leave_pdu {
|
||||||
debug_assert_eq!(leave_pdu.kind, TimelineEventType::RoomMember);
|
debug_assert_eq!(
|
||||||
|
leave_pdu.kind,
|
||||||
|
TimelineEventType::RoomMember,
|
||||||
|
"leave PDU should be m.room.member"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let does_not_exist = services.rooms.metadata.exists(room_id).eq(&false).await;
|
let does_not_exist = services.rooms.metadata.exists(room_id).eq(&false).await;
|
||||||
@@ -93,7 +97,11 @@ pub(super) async fn load_left_room(
|
|||||||
// the user left if they're allowed to see it.
|
// the user left if they're allowed to see it.
|
||||||
|
|
||||||
let leave_state_key = sender_user;
|
let leave_state_key = sender_user;
|
||||||
debug_assert_eq!(Some(leave_state_key.as_str()), leave_pdu.state_key());
|
debug_assert_eq!(
|
||||||
|
Some(leave_state_key.as_str()),
|
||||||
|
leave_pdu.state_key(),
|
||||||
|
"leave PDU should be for the user requesting the sync"
|
||||||
|
);
|
||||||
|
|
||||||
let leave_shortstatehash = services
|
let leave_shortstatehash = services
|
||||||
.rooms
|
.rooms
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ async fn collect_typing_events(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut typing_response = sync_events::v5::response::Typing::default();
|
let mut typing_response = sync_events::v5::response::Typing::default();
|
||||||
for (room_id, (required_state_request, timeline_limit, roomsince)) in todo_rooms {
|
for (room_id, (_, _, roomsince)) in todo_rooms {
|
||||||
if services.rooms.typing.last_typing_update(room_id).await? <= *roomsince {
|
if services.rooms.typing.last_typing_update(room_id).await? <= *roomsince {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ pub(crate) async fn create_invite_route(
|
|||||||
.mark_as_invited(
|
.mark_as_invited(
|
||||||
&recipient_user,
|
&recipient_user,
|
||||||
&body.room_id,
|
&body.room_id,
|
||||||
&sender_user,
|
sender_user,
|
||||||
Some(invite_state),
|
Some(invite_state),
|
||||||
body.via.clone(),
|
body.via.clone(),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -283,7 +283,6 @@ where
|
|||||||
)
|
)
|
||||||
.ready_filter_map(|state_event| match state_event {
|
.ready_filter_map(|state_event| match state_event {
|
||||||
| (Ok(state_key), Ok(event_id)) => Some(Ok((state_key, event_id))),
|
| (Ok(state_key), Ok(event_id)) => Some(Ok((state_key, event_id))),
|
||||||
| (Err(e), _) => Some(Err(e)),
|
| (Err(e), _) | (_, Err(e)) => Some(Err(e)),
|
||||||
| (_, Err(e)) => Some(Err(e)),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ where
|
|||||||
// knock event for auth
|
// knock event for auth
|
||||||
self.services
|
self.services
|
||||||
.state_cache
|
.state_cache
|
||||||
.update_membership(room_id, target_user_id, &pdu, true)
|
.update_membership(room_id, target_user_id, pdu, true)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user