Bump Ruma for device 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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -3566,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@@ -3593,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"headers",
|
"headers",
|
||||||
@@ -3608,6 +3608,7 @@ dependencies = [
|
|||||||
"ruma-events",
|
"ruma-events",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"smallstr",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
@@ -3615,7 +3616,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
@@ -3624,7 +3625,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
@@ -3639,7 +3640,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -3651,7 +3652,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=9f4ad222669db368e5e376637d8e29c3bec27272#9f4ad222669db368e5e376637d8e29c3bec27272"
|
source = "git+https://github.com/matrix-construct/ruma?rev=be88c97057b28374d418394db376a7049d8b6464#be88c97057b28374d418394db376a7049d8b6464"
|
||||||
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 = "9f4ad222669db368e5e376637d8e29c3bec27272"
|
rev = "be88c97057b28374d418394db376a7049d8b6464"
|
||||||
features = [
|
features = [
|
||||||
"__compat",
|
"__compat",
|
||||||
"appservice-api-c",
|
"appservice-api-c",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use ruma::{
|
|||||||
self, delete_device, delete_devices, get_device, get_devices, update_device,
|
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};
|
use crate::{Ruma, client::DEVICE_ID_LENGTH, router::auth_uiaa};
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ pub(crate) async fn update_device_route(
|
|||||||
|
|
||||||
device
|
device
|
||||||
.last_seen_ip
|
.last_seen_ip
|
||||||
.clone_from(&Some(client.to_string()));
|
.clone_from(&Some(to_small_string(client)));
|
||||||
|
|
||||||
device
|
device
|
||||||
.last_seen_ts
|
.last_seen_ts
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ fn add_unsigned_device_display_name(
|
|||||||
.or_insert_with(|| CanonicalJsonObject::default().into())
|
.or_insert_with(|| CanonicalJsonObject::default().into())
|
||||||
{
|
{
|
||||||
let display_name = if include_display_names {
|
let display_name = if include_display_names {
|
||||||
CanonicalJsonValue::String(display_name)
|
CanonicalJsonValue::String(display_name.to_string())
|
||||||
} else {
|
} else {
|
||||||
CanonicalJsonValue::String(metadata.device_id.into())
|
CanonicalJsonValue::String(metadata.device_id.into())
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ pub(crate) async fn get_devices_route(
|
|||||||
.allow_device_name_federation
|
.allow_device_name_federation
|
||||||
.then_some(display_name)
|
.then_some(display_name)
|
||||||
.flatten()
|
.flatten()
|
||||||
.or_else(|| Some(device_id.as_str().to_owned()));
|
.or_else(|| Some(device_id.as_str().into()));
|
||||||
|
|
||||||
services
|
services
|
||||||
.users
|
.users
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ pub async fn create_device(
|
|||||||
let notify = true;
|
let notify = true;
|
||||||
self.put_device_metadata(user_id, notify, &Device {
|
self.put_device_metadata(user_id, notify, &Device {
|
||||||
device_id: device_id.into(),
|
device_id: device_id.into(),
|
||||||
display_name: initial_device_display_name,
|
display_name: initial_device_display_name.map(Into::into),
|
||||||
last_seen_ip: client_ip,
|
last_seen_ip: client_ip.map(Into::into),
|
||||||
last_seen_ts: Some(MilliSecondsSinceUnixEpoch::now()),
|
last_seen_ts: Some(MilliSecondsSinceUnixEpoch::now()),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user