Bump Ruma for device type optimizations.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-11-02 00:01:48 +00:00
parent aa3f14cd57
commit d680a6ba53
6 changed files with 18 additions and 17 deletions

21
Cargo.lock generated
View File

@@ -3476,7 +3476,7 @@ dependencies = [
[[package]]
name = "ruma"
version = "0.13.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"assign",
"js_int",
@@ -3495,7 +3495,7 @@ dependencies = [
[[package]]
name = "ruma-appservice-api"
version = "0.13.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"js_int",
"ruma-common",
@@ -3507,7 +3507,7 @@ dependencies = [
[[package]]
name = "ruma-client-api"
version = "0.21.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"as_variant",
"assign",
@@ -3532,7 +3532,7 @@ dependencies = [
[[package]]
name = "ruma-common"
version = "0.16.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"as_variant",
"base64",
@@ -3566,7 +3566,7 @@ dependencies = [
[[package]]
name = "ruma-events"
version = "0.31.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"as_variant",
"indexmap",
@@ -3593,7 +3593,7 @@ dependencies = [
[[package]]
name = "ruma-federation-api"
version = "0.12.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"bytes",
"headers",
@@ -3608,6 +3608,7 @@ dependencies = [
"ruma-events",
"serde",
"serde_json",
"smallstr",
"thiserror 2.0.17",
"tracing",
]
@@ -3615,7 +3616,7 @@ dependencies = [
[[package]]
name = "ruma-identifiers-validation"
version = "0.11.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"js_int",
"thiserror 2.0.17",
@@ -3624,7 +3625,7 @@ dependencies = [
[[package]]
name = "ruma-macros"
version = "0.16.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"cfg-if",
"proc-macro-crate",
@@ -3639,7 +3640,7 @@ dependencies = [
[[package]]
name = "ruma-push-gateway-api"
version = "0.12.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"js_int",
"ruma-common",
@@ -3651,7 +3652,7 @@ dependencies = [
[[package]]
name = "ruma-signatures"
version = "0.18.0"
source = "git+https://github.com/matrix-construct/ruma?rev=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
dependencies = [
"base64",
"ed25519-dalek",

View File

@@ -320,7 +320,7 @@ default-features = false
[workspace.dependencies.ruma]
git = "https://github.com/matrix-construct/ruma"
rev = "9f4ad222669db368e5e376637d8e29c3bec27272"
rev = "be88c97057b28374d418394db376a7049d8b6464"
features = [
"__compat",
"appservice-api-c",

View File

@@ -7,7 +7,7 @@ use ruma::{
self, delete_device, delete_devices, get_device, get_devices, update_device,
},
};
use tuwunel_core::{Err, Result, debug, err, utils};
use tuwunel_core::{Err, Result, debug, err, utils, utils::string::to_small_string};
use crate::{Ruma, client::DEVICE_ID_LENGTH, router::auth_uiaa};
@@ -66,7 +66,7 @@ pub(crate) async fn update_device_route(
device
.last_seen_ip
.clone_from(&Some(client.to_string()));
.clone_from(&Some(to_small_string(client)));
device
.last_seen_ts

View File

@@ -571,7 +571,7 @@ fn add_unsigned_device_display_name(
.or_insert_with(|| CanonicalJsonObject::default().into())
{
let display_name = if include_display_names {
CanonicalJsonValue::String(display_name)
CanonicalJsonValue::String(display_name.to_string())
} else {
CanonicalJsonValue::String(metadata.device_id.into())
};

View File

@@ -58,7 +58,7 @@ pub(crate) async fn get_devices_route(
.allow_device_name_federation
.then_some(display_name)
.flatten()
.or_else(|| Some(device_id.as_str().to_owned()));
.or_else(|| Some(device_id.as_str().into()));
services
.users

View File

@@ -43,8 +43,8 @@ pub async fn create_device(
let notify = true;
self.put_device_metadata(user_id, notify, &Device {
device_id: device_id.into(),
display_name: initial_device_display_name,
last_seen_ip: client_ip,
display_name: initial_device_display_name.map(Into::into),
last_seen_ip: client_ip.map(Into::into),
last_seen_ts: Some(MilliSecondsSinceUnixEpoch::now()),
});