1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-09-15 18:57:03 +00:00

chore(ruma): bump

This commit is contained in:
Matthias Ahouansou 2025-03-15 00:29:52 +00:00
parent 244dbbe6dd
commit d0607b6459
No known key found for this signature in database
5 changed files with 24 additions and 39 deletions

View file

@ -483,12 +483,9 @@ impl Service {
));
}
if !state_res::event_auth::auth_check(
&room_version,
&incoming_pdu,
None::<PduEvent>, // TODO: third party invite
|k, s| auth_events.get(&(k.to_string().into(), s.to_owned())),
)
if !state_res::event_auth::auth_check(&room_version, &incoming_pdu, |k, s| {
auth_events.get(&(k.to_string().into(), s.to_owned()))
})
.map_err(|_e| Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed"))?
{
return Err(Error::BadRequest(
@ -792,11 +789,8 @@ impl Service {
debug!("Starting auth check");
// 11. Check the auth of the event passes based on the state of the event
let check_result = state_res::event_auth::auth_check(
&room_version,
&incoming_pdu,
None::<PduEvent>, // TODO: third party invite
|k, s| {
let check_result =
state_res::event_auth::auth_check(&room_version, &incoming_pdu, |k, s| {
services()
.rooms
.short
@ -805,9 +799,8 @@ impl Service {
.flatten()
.and_then(|shortstatekey| state_at_incoming_event.get(&shortstatekey))
.and_then(|event_id| services().rooms.timeline.get_pdu(event_id).ok().flatten())
},
)
.map_err(|_e| Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed."))?;
})
.map_err(|_e| Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed."))?;
if !check_result {
return Err(Error::bad_database(
@ -825,12 +818,9 @@ impl Service {
&incoming_pdu.content,
)?;
let soft_fail = !state_res::event_auth::auth_check(
&room_version,
&incoming_pdu,
None::<PduEvent>,
|k, s| auth_events.get(&(k.clone(), s.to_owned())),
)
let soft_fail = !state_res::event_auth::auth_check(&room_version, &incoming_pdu, |k, s| {
auth_events.get(&(k.clone(), s.to_owned()))
})
.map_err(|_e| Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed."))?
|| incoming_pdu.kind == TimelineEventType::RoomRedaction
&& match room_version_id {

View file

@ -233,7 +233,6 @@ impl Service {
let authenticated = state_res::event_auth::auth_check(
&state_res::RoomVersion::new(&room_version_id).expect("room version is supported"),
&parsed_join_pdu,
None::<PduEvent>, // TODO: third party invite
|k, s| {
services()
.rooms

View file

@ -766,12 +766,9 @@ impl Service {
signatures: None,
};
let auth_check = state_res::auth_check(
&room_version,
&pdu,
None::<PduEvent>, // TODO: third_party_invite
|k, s| auth_events.get(&(k.clone(), s.to_owned())),
)
let auth_check = state_res::auth_check(&room_version, &pdu, |k, s| {
auth_events.get(&(k.clone(), s.to_owned()))
})
.map_err(|e| {
error!("{:?}", e);
Error::bad_database("Auth check failed.")