Bump Ruma w/ PushRule type optimizations.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
21
Cargo.lock
generated
21
Cargo.lock
generated
@@ -3476,7 +3476,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma"
|
name = "ruma"
|
||||||
version = "0.13.0"
|
version = "0.13.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"js_int",
|
"js_int",
|
||||||
@@ -3495,7 +3495,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-appservice-api"
|
name = "ruma-appservice-api"
|
||||||
version = "0.13.0"
|
version = "0.13.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -3507,7 +3507,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-client-api"
|
name = "ruma-client-api"
|
||||||
version = "0.21.0"
|
version = "0.21.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"assign",
|
"assign",
|
||||||
@@ -3532,7 +3532,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-common"
|
name = "ruma-common"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -3551,6 +3551,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_html_form",
|
"serde_html_form",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"smallstr",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"time",
|
"time",
|
||||||
@@ -3565,7 +3566,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-events"
|
name = "ruma-events"
|
||||||
version = "0.31.0"
|
version = "0.31.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@@ -3592,7 +3593,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-federation-api"
|
name = "ruma-federation-api"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"headers",
|
"headers",
|
||||||
@@ -3614,7 +3615,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-identifiers-validation"
|
name = "ruma-identifiers-validation"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
@@ -3623,7 +3624,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-macros"
|
name = "ruma-macros"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
@@ -3638,7 +3639,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-push-gateway-api"
|
name = "ruma-push-gateway-api"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -3650,7 +3651,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-signatures"
|
name = "ruma-signatures"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
source = "git+https://github.com/matrix-construct/ruma?rev=b858d3478f2792a381463ef9b63f6c1469a5d81c#b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ default-features = false
|
|||||||
|
|
||||||
[workspace.dependencies.ruma]
|
[workspace.dependencies.ruma]
|
||||||
git = "https://github.com/matrix-construct/ruma"
|
git = "https://github.com/matrix-construct/ruma"
|
||||||
rev = "b858d3478f2792a381463ef9b63f6c1469a5d81c"
|
rev = "9f4ad222669db368e5e376637d8e29c3bec27272"
|
||||||
features = [
|
features = [
|
||||||
"__compat",
|
"__compat",
|
||||||
"appservice-api-c",
|
"appservice-api-c",
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ pub(crate) async fn set_pushrule_actions_route(
|
|||||||
if account_data
|
if account_data
|
||||||
.content
|
.content
|
||||||
.global
|
.global
|
||||||
.set_actions(body.kind.clone(), &body.rule_id, body.actions.clone())
|
.set_actions(body.kind.clone(), &body.rule_id, body.actions.clone().into())
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
return Err!(Request(NotFound("Push rule not found.")));
|
return Err!(Request(NotFound("Push rule not found.")));
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ use tuwunel_core::{
|
|||||||
future::{OptionStream, ReadyEqExt},
|
future::{OptionStream, ReadyEqExt},
|
||||||
math::ruma_from_u64,
|
math::ruma_from_u64,
|
||||||
stream::{BroadbandExt, Tools, TryExpect, WidebandExt},
|
stream::{BroadbandExt, Tools, TryExpect, WidebandExt},
|
||||||
|
string::to_small_string,
|
||||||
},
|
},
|
||||||
warn,
|
warn,
|
||||||
};
|
};
|
||||||
@@ -218,7 +219,7 @@ async fn build_empty_response(
|
|||||||
.count_one_time_keys(body.sender_user(), body.sender_device())
|
.count_one_time_keys(body.sender_user(), body.sender_device())
|
||||||
.await,
|
.await,
|
||||||
|
|
||||||
..sync_events::v3::Response::new(next_batch.to_string())
|
..sync_events::v3::Response::new(to_small_string(next_batch))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +443,7 @@ async fn build_sync_events(
|
|||||||
device_one_time_keys_count,
|
device_one_time_keys_count,
|
||||||
// Fallback keys are not yet supported
|
// Fallback keys are not yet supported
|
||||||
device_unused_fallback_key_types: None,
|
device_unused_fallback_key_types: None,
|
||||||
next_batch: next_batch.to_string(),
|
next_batch: to_small_string(next_batch),
|
||||||
presence: Presence { events: presence_events },
|
presence: Presence { events: presence_events },
|
||||||
rooms: Rooms {
|
rooms: Rooms {
|
||||||
leave: left_rooms,
|
leave: left_rooms,
|
||||||
|
|||||||
@@ -257,7 +257,9 @@ async fn db_lt_12(services: &Services) -> Result {
|
|||||||
|
|
||||||
if let Some(rule) = rule {
|
if let Some(rule) = rule {
|
||||||
let mut rule = rule.clone();
|
let mut rule = rule.clone();
|
||||||
content_rule_transformation[1].clone_into(&mut rule.rule_id);
|
let mut rule_id = String::new();
|
||||||
|
content_rule_transformation[1].clone_into(&mut rule_id);
|
||||||
|
rule.rule_id = rule_id.into();
|
||||||
rules_list
|
rules_list
|
||||||
.content
|
.content
|
||||||
.shift_remove(content_rule_transformation[0]);
|
.shift_remove(content_rule_transformation[0]);
|
||||||
@@ -280,7 +282,9 @@ async fn db_lt_12(services: &Services) -> Result {
|
|||||||
let rule = rules_list.underride.get(transformation[0]);
|
let rule = rules_list.underride.get(transformation[0]);
|
||||||
if let Some(rule) = rule {
|
if let Some(rule) = rule {
|
||||||
let mut rule = rule.clone();
|
let mut rule = rule.clone();
|
||||||
transformation[1].clone_into(&mut rule.rule_id);
|
let mut rule_id = String::new();
|
||||||
|
transformation[1].clone_into(&mut rule_id);
|
||||||
|
rule.rule_id = rule_id.into();
|
||||||
rules_list
|
rules_list
|
||||||
.underride
|
.underride
|
||||||
.shift_remove(transformation[0]);
|
.shift_remove(transformation[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user