Bump ruma to 3924283c5e94d2020f0991ce35c27667f8c61f0a (add RoomVersion arg to auth_types_for_event)

This commit is contained in:
Olivia Lee 2025-07-29 22:37:33 -07:00 committed by Jonas Platte
parent d8ec961589
commit 3f8d7d19ce
No known key found for this signature in database
GPG key ID: 7D261D771D915378
5 changed files with 25 additions and 16 deletions

View file

@ -895,6 +895,7 @@ impl Service {
// Soft fail check before doing state res
let auth_events = services().rooms.state.get_auth_events(
room_id,
&ruma_room_version,
&incoming_pdu.kind,
&incoming_pdu.sender,
incoming_pdu.state_key.as_deref(),

View file

@ -430,10 +430,11 @@ impl Service {
}
/// This fetches auth events from the current state.
#[tracing::instrument(skip(self))]
#[tracing::instrument(skip(self, room_version))]
pub(crate) fn get_auth_events(
&self,
room_id: &RoomId,
room_version: &state_res::RoomVersion,
kind: &TimelineEventType,
sender: &UserId,
state_key: Option<&str>,
@ -444,9 +445,14 @@ impl Service {
return Ok(HashMap::new());
};
let auth_events =
state_res::auth_types_for_event(kind, sender, state_key, content)
.expect("content is a valid JSON object");
let auth_events = state_res::auth_types_for_event(
kind,
sender,
state_key,
content,
room_version,
)
.expect("content is a valid JSON object");
let mut sauthevents = auth_events
.into_iter()

View file

@ -777,6 +777,7 @@ impl Service {
let auth_events = services().rooms.state.get_auth_events(
room_id,
&ruma_room_version,
&event_type,
sender,
state_key.as_deref(),