mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
Bump ruma to 649d683f3f5b8f4f7eb1e728443e4baf25cfebca (stateres refactor #1)
The only change to the internal interface for this one is removing the current_third_party_invite argument from state_res::auth_check. Ruma now fetches the event using the fetch_state closure. This is convenient for us, because we previously didn't bother to implement it.
This commit is contained in:
parent
d283da51c6
commit
98dee6ad49
5 changed files with 20 additions and 30 deletions
|
|
@ -1041,8 +1041,6 @@ async fn join_room_by_id_helper(
|
|||
Error::UnsupportedRoomVersion(room_version_id.clone())
|
||||
})?,
|
||||
&parsed_join_pdu,
|
||||
// TODO: third party invite
|
||||
None::<PduEvent>,
|
||||
|k, s| {
|
||||
services()
|
||||
.rooms
|
||||
|
|
|
|||
|
|
@ -507,8 +507,6 @@ impl Service {
|
|||
if !state_res::event_auth::auth_check(
|
||||
&ruma_room_version,
|
||||
&incoming_pdu,
|
||||
// TODO: third party invite
|
||||
None::<PduEvent>,
|
||||
|k, s| auth_events.get(&(k.to_string().into(), s.to_owned())),
|
||||
)
|
||||
.map_err(|_e| {
|
||||
|
|
@ -878,8 +876,6 @@ impl Service {
|
|||
let check_result = state_res::event_auth::auth_check(
|
||||
&ruma_room_version,
|
||||
&incoming_pdu,
|
||||
// TODO: third party invite
|
||||
None::<PduEvent>,
|
||||
|k, s| {
|
||||
services()
|
||||
.rooms
|
||||
|
|
@ -923,7 +919,6 @@ impl Service {
|
|||
let soft_fail = !state_res::event_auth::auth_check(
|
||||
&ruma_room_version,
|
||||
&incoming_pdu,
|
||||
None::<PduEvent>,
|
||||
|k, s| auth_events.get(&(k.clone(), s.to_owned())),
|
||||
)
|
||||
.map_err(|_e| {
|
||||
|
|
|
|||
|
|
@ -862,17 +862,14 @@ impl Service {
|
|||
signatures: None,
|
||||
};
|
||||
|
||||
let auth_check = state_res::auth_check(
|
||||
&ruma_room_version,
|
||||
&pdu,
|
||||
// TODO: third_party_invite
|
||||
None::<PduEvent>,
|
||||
|k, s| auth_events.get(&(k.clone(), s.to_owned())),
|
||||
)
|
||||
.map_err(|error| {
|
||||
error!(%error, "Auth check failed");
|
||||
Error::BadDatabase("Auth check failed.")
|
||||
})?;
|
||||
let auth_check =
|
||||
state_res::auth_check(&ruma_room_version, &pdu, |k, s| {
|
||||
auth_events.get(&(k.clone(), s.to_owned()))
|
||||
})
|
||||
.map_err(|error| {
|
||||
error!(%error, "Auth check failed");
|
||||
Error::BadDatabase("Auth check failed.")
|
||||
})?;
|
||||
|
||||
if !auth_check {
|
||||
return Err(Error::BadRequest(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue