mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
Bump ruma to 3924283c5e94d2020f0991ce35c27667f8c61f0a (add RoomVersion arg to auth_types_for_event)
This commit is contained in:
parent
b5bc53bb2d
commit
c4c294d64c
5 changed files with 25 additions and 16 deletions
23
Cargo.lock
generated
23
Cargo.lock
generated
|
|
@ -2442,7 +2442,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma"
|
name = "ruma"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"js_int",
|
"js_int",
|
||||||
|
|
@ -2461,7 +2461,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-appservice-api"
|
name = "ruma-appservice-api"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
|
|
@ -2473,7 +2473,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-client-api"
|
name = "ruma-client-api"
|
||||||
version = "0.20.1"
|
version = "0.20.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"assign",
|
"assign",
|
||||||
|
|
@ -2496,7 +2496,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-common"
|
name = "ruma-common"
|
||||||
version = "0.15.1"
|
version = "0.15.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"base64",
|
"base64",
|
||||||
|
|
@ -2527,7 +2527,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-events"
|
name = "ruma-events"
|
||||||
version = "0.30.1"
|
version = "0.30.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"indexmap 2.10.0",
|
"indexmap 2.10.0",
|
||||||
|
|
@ -2550,7 +2550,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-federation-api"
|
name = "ruma-federation-api"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"headers",
|
"headers",
|
||||||
|
|
@ -2572,7 +2572,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-identifiers-validation"
|
name = "ruma-identifiers-validation"
|
||||||
version = "0.10.1"
|
version = "0.10.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
|
|
@ -2581,7 +2581,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-macros"
|
name = "ruma-macros"
|
||||||
version = "0.15.1"
|
version = "0.15.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
|
|
@ -2596,7 +2596,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-push-gateway-api"
|
name = "ruma-push-gateway-api"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
|
|
@ -2608,7 +2608,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-signatures"
|
name = "ruma-signatures"
|
||||||
version = "0.17.0"
|
version = "0.17.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
|
|
@ -2624,11 +2624,12 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-state-res"
|
name = "ruma-state-res"
|
||||||
version = "0.13.0"
|
version = "0.13.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=e8b0876dda083433a7f9181d47d0aff5a5e05497#e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
source = "git+https://github.com/ruma/ruma.git?rev=3924283c5e94d2020f0991ce35c27667f8c61f0a#3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
"ruma-events",
|
"ruma-events",
|
||||||
|
"ruma-signatures",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ xdg = "2.5.2"
|
||||||
|
|
||||||
[dependencies.ruma]
|
[dependencies.ruma]
|
||||||
git = "https://github.com/ruma/ruma.git"
|
git = "https://github.com/ruma/ruma.git"
|
||||||
rev = "e8b0876dda083433a7f9181d47d0aff5a5e05497"
|
rev = "3924283c5e94d2020f0991ce35c27667f8c61f0a"
|
||||||
features = [
|
features = [
|
||||||
"compat-server-signing-key-version",
|
"compat-server-signing-key-version",
|
||||||
"compat-empty-string-null",
|
"compat-empty-string-null",
|
||||||
|
|
|
||||||
|
|
@ -895,6 +895,7 @@ impl Service {
|
||||||
// Soft fail check before doing state res
|
// Soft fail check before doing state res
|
||||||
let auth_events = services().rooms.state.get_auth_events(
|
let auth_events = services().rooms.state.get_auth_events(
|
||||||
room_id,
|
room_id,
|
||||||
|
&ruma_room_version,
|
||||||
&incoming_pdu.kind,
|
&incoming_pdu.kind,
|
||||||
&incoming_pdu.sender,
|
&incoming_pdu.sender,
|
||||||
incoming_pdu.state_key.as_deref(),
|
incoming_pdu.state_key.as_deref(),
|
||||||
|
|
|
||||||
|
|
@ -430,10 +430,11 @@ impl Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This fetches auth events from the current state.
|
/// This fetches auth events from the current state.
|
||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self, room_version))]
|
||||||
pub(crate) fn get_auth_events(
|
pub(crate) fn get_auth_events(
|
||||||
&self,
|
&self,
|
||||||
room_id: &RoomId,
|
room_id: &RoomId,
|
||||||
|
room_version: &state_res::RoomVersion,
|
||||||
kind: &TimelineEventType,
|
kind: &TimelineEventType,
|
||||||
sender: &UserId,
|
sender: &UserId,
|
||||||
state_key: Option<&str>,
|
state_key: Option<&str>,
|
||||||
|
|
@ -444,9 +445,14 @@ impl Service {
|
||||||
return Ok(HashMap::new());
|
return Ok(HashMap::new());
|
||||||
};
|
};
|
||||||
|
|
||||||
let auth_events =
|
let auth_events = state_res::auth_types_for_event(
|
||||||
state_res::auth_types_for_event(kind, sender, state_key, content)
|
kind,
|
||||||
.expect("content is a valid JSON object");
|
sender,
|
||||||
|
state_key,
|
||||||
|
content,
|
||||||
|
room_version,
|
||||||
|
)
|
||||||
|
.expect("content is a valid JSON object");
|
||||||
|
|
||||||
let mut sauthevents = auth_events
|
let mut sauthevents = auth_events
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
||||||
|
|
@ -777,6 +777,7 @@ impl Service {
|
||||||
|
|
||||||
let auth_events = services().rooms.state.get_auth_events(
|
let auth_events = services().rooms.state.get_auth_events(
|
||||||
room_id,
|
room_id,
|
||||||
|
&ruma_room_version,
|
||||||
&event_type,
|
&event_type,
|
||||||
sender,
|
sender,
|
||||||
state_key.as_deref(),
|
state_key.as_deref(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue