pipeline prologue of handle_incoming_pdu

simplify room_version/first_pdu_in_room argument passing

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-01-26 06:15:01 +00:00
commit 677316631a
7 changed files with 62 additions and 56 deletions

View file

@ -4,7 +4,7 @@ use conduwuit::{debug, debug_warn, implement, Err, Error, PduEvent, Result};
use futures::FutureExt;
use ruma::{
api::federation::event::get_room_state_ids, events::StateEventType, EventId, OwnedEventId,
RoomId, RoomVersionId, ServerName,
RoomId, ServerName,
};
use crate::rooms::short::ShortStateKey;
@ -23,7 +23,6 @@ pub(super) async fn fetch_state(
origin: &ServerName,
create_event: &PduEvent,
room_id: &RoomId,
room_version_id: &RoomVersionId,
event_id: &EventId,
) -> Result<Option<HashMap<u64, OwnedEventId>>> {
let res = self
@ -38,7 +37,7 @@ pub(super) async fn fetch_state(
debug!("Fetching state events");
let state_vec = self
.fetch_and_handle_outliers(origin, &res.pdu_ids, create_event, room_id, room_version_id)
.fetch_and_handle_outliers(origin, &res.pdu_ids, create_event, room_id)
.boxed()
.await;