mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-07-17 11:51:59 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39a1c1cf33 | ||
|
|
eff454218c | ||
|
|
e2eb980b5e | ||
|
|
8945cc9e10 | ||
|
|
78adeccda1 | ||
|
|
8195373d81 |
@@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20'
|
if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20'
|
||||||
uses: https://github.com/actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
uses: https://github.com/actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📦 Setup Node.js
|
- name: 📦 Setup Node.js
|
||||||
uses: https://github.com/actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
uses: https://github.com/actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
|
|
||||||
|
|||||||
Generated
+20
-20
@@ -637,7 +637,7 @@ checksum = "aa61aec073ec94791433ddf3df2323ff9d1711557c2a0eefb0f99cb4f8dca520"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"semver",
|
"semver",
|
||||||
"serde",
|
"serde",
|
||||||
"toml 1.1.2+spec-1.1.0",
|
"toml 1.1.3+spec-1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -996,7 +996,7 @@ dependencies = [
|
|||||||
"tikv-jemallocator",
|
"tikv-jemallocator",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-metrics",
|
"tokio-metrics",
|
||||||
"toml 1.1.2+spec-1.1.0",
|
"toml 1.1.3+spec-1.1.0",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
@@ -4579,7 +4579,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma"
|
name = "ruma"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"js_int",
|
"js_int",
|
||||||
@@ -4598,7 +4598,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-appservice-api"
|
name = "ruma-appservice-api"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -4610,7 +4610,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-client-api"
|
name = "ruma-client-api"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"assign",
|
"assign",
|
||||||
@@ -4632,7 +4632,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-common"
|
name = "ruma-common"
|
||||||
version = "0.19.0"
|
version = "0.19.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -4665,7 +4665,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-events"
|
name = "ruma-events"
|
||||||
version = "0.34.0"
|
version = "0.34.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"indexmap 2.14.0",
|
"indexmap 2.14.0",
|
||||||
@@ -4686,7 +4686,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-federation-api"
|
name = "ruma-federation-api"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"headers",
|
"headers",
|
||||||
@@ -4709,7 +4709,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-identifiers-validation"
|
name = "ruma-identifiers-validation"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
@@ -4718,7 +4718,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-macros"
|
name = "ruma-macros"
|
||||||
version = "0.19.0"
|
version = "0.19.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -4728,13 +4728,13 @@ dependencies = [
|
|||||||
"ruma-identifiers-validation",
|
"ruma-identifiers-validation",
|
||||||
"serde",
|
"serde",
|
||||||
"syn",
|
"syn",
|
||||||
"toml 1.1.2+spec-1.1.0",
|
"toml 1.1.3+spec-1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-push-gateway-api"
|
name = "ruma-push-gateway-api"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -4746,7 +4746,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-signatures"
|
name = "ruma-signatures"
|
||||||
version = "0.21.0"
|
version = "0.21.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
@@ -4763,7 +4763,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-state-res"
|
name = "ruma-state-res"
|
||||||
version = "0.17.0"
|
version = "0.17.0"
|
||||||
source = "git+https://github.com/ruma/ruma.git?rev=9b6a2e7323649af926e4b5363d87239ee4247f4a#9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
source = "git+https://github.com/ruma/ruma.git?rev=7f925c183b748e649bd2fa24eb1f3304159a73a4#7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -5631,9 +5631,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.118"
|
version = "2.0.119"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
|
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -5944,9 +5944,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "1.1.2+spec-1.1.0"
|
version = "1.1.3+spec-1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee"
|
checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.14.0",
|
"indexmap 2.14.0",
|
||||||
"serde_core",
|
"serde_core",
|
||||||
@@ -6018,9 +6018,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_writer"
|
name = "toml_writer"
|
||||||
version = "1.1.1+spec-1.1.0"
|
version = "1.1.2+spec-1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"
|
checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tonic"
|
name = "tonic"
|
||||||
|
|||||||
+1
-1
@@ -344,7 +344,7 @@ version = "1.1.1"
|
|||||||
[workspace.dependencies.ruma]
|
[workspace.dependencies.ruma]
|
||||||
# version = "0.14.1"
|
# version = "0.14.1"
|
||||||
git = "https://github.com/ruma/ruma.git"
|
git = "https://github.com/ruma/ruma.git"
|
||||||
rev = "9b6a2e7323649af926e4b5363d87239ee4247f4a"
|
rev = "7f925c183b748e649bd2fa24eb1f3304159a73a4"
|
||||||
features = [
|
features = [
|
||||||
"appservice-api-c",
|
"appservice-api-c",
|
||||||
"client-api",
|
"client-api",
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed newly joined rooms failing to sync their full state (including the room name) to clients using legacy sync.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Updated an out-of-date statement about Oracle Linux release cadences.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed high CPU usage when multiple clients from the same account were connected at once. Each sync woke the account's other sync loops, causing them to wake each other in a loop.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix joining restricted rooms over federation failing with signature verification error.
|
||||||
@@ -15,8 +15,8 @@ ## Overview
|
|||||||
|
|
||||||
:::warning Oracle Linux support
|
:::warning Oracle Linux support
|
||||||
Due to upstream limitations, Terra is only usable on Oracle Linux if you use [upstream EPEL](https://docs.fedoraproject.org/en-US/epel/getting-started/)
|
Due to upstream limitations, Terra is only usable on Oracle Linux if you use [upstream EPEL](https://docs.fedoraproject.org/en-US/epel/getting-started/)
|
||||||
rather than Oracle's rebuilds of EPEL. Oracle tends to lag behind on new EL versions, both major and minor—for example, as of the time of writing, 10.2 has been
|
rather than Oracle's rebuilds of EPEL. Oracle tends to lag behind on new EL versions, both major and minor—for example, Oracle's release of 10.2 lagged
|
||||||
available for over a month through other ELs, but Oracle has not yet released corresponding updates—so you may encounter further compatibility issues with EPEL.
|
approximately 1.5 months behind other ELs—so you may encounter further compatibility issues with EPEL.
|
||||||
**For this reason, it is recommended that you use another EL distribution if at all possible.**
|
**For this reason, it is recommended that you use another EL distribution if at all possible.**
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|||||||
@@ -269,13 +269,22 @@ async fn build_state_and_timeline(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let (state_events, notification_counts, joined_since_last_sync) = try_join3(
|
let (notification_counts, joined_since_last_sync) = try_join(
|
||||||
build_state_events(services, sync_context, room_id, shortstatehashes, &timeline),
|
|
||||||
build_notification_counts(services, sync_context, room_id, &timeline),
|
build_notification_counts(services, sync_context, room_id, &timeline),
|
||||||
check_joined_since_last_sync(services, shortstatehashes, sync_context),
|
check_joined_since_last_sync(services, shortstatehashes, sync_context),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
let state_events = build_state_events(
|
||||||
|
services,
|
||||||
|
sync_context,
|
||||||
|
room_id,
|
||||||
|
shortstatehashes,
|
||||||
|
&timeline,
|
||||||
|
joined_since_last_sync,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
// the timeline should always include at least one PDU if the syncing user
|
// the timeline should always include at least one PDU if the syncing user
|
||||||
// joined since the last sync, that being the syncing user's join event. if
|
// joined since the last sync, that being the syncing user's join event. if
|
||||||
// it's empty something is wrong.
|
// it's empty something is wrong.
|
||||||
@@ -459,6 +468,7 @@ async fn build_state_events(
|
|||||||
room_id: &RoomId,
|
room_id: &RoomId,
|
||||||
shortstatehashes: ShortStateHashes,
|
shortstatehashes: ShortStateHashes,
|
||||||
timeline: &TimelinePdus,
|
timeline: &TimelinePdus,
|
||||||
|
joined_since_last_sync: bool,
|
||||||
) -> Result<Vec<PduEvent>> {
|
) -> Result<Vec<PduEvent>> {
|
||||||
let SyncContext {
|
let SyncContext {
|
||||||
syncing_user,
|
syncing_user,
|
||||||
@@ -488,9 +498,10 @@ async fn build_state_events(
|
|||||||
/*
|
/*
|
||||||
if `last_sync_end_count` is Some (meaning this is an incremental sync), and `last_sync_end_shortstatehash`
|
if `last_sync_end_count` is Some (meaning this is an incremental sync), and `last_sync_end_shortstatehash`
|
||||||
is Some (meaning the syncing user didn't just join this room for the first time ever), and `full_state` is false,
|
is Some (meaning the syncing user didn't just join this room for the first time ever), and `full_state` is false,
|
||||||
then use `build_state_incremental`.
|
and the user didn't just join the room since the last sync, then use `build_state_incremental`.
|
||||||
*/
|
*/
|
||||||
| (Some(_), Some(last_sync_end_shortstatehash)) if !full_state =>
|
| (Some(_), Some(last_sync_end_shortstatehash))
|
||||||
|
if !full_state && !joined_since_last_sync =>
|
||||||
build_state_incremental(
|
build_state_incremental(
|
||||||
services,
|
services,
|
||||||
syncing_user,
|
syncing_user,
|
||||||
|
|||||||
+32
-1
@@ -91,7 +91,7 @@ pub(crate) async fn validate_any_membership_event(
|
|||||||
expected_room_id: OwnedRoomId,
|
expected_room_id: OwnedRoomId,
|
||||||
expected_event_id: OwnedEventId,
|
expected_event_id: OwnedEventId,
|
||||||
) -> Result<(CanonicalJsonObject, MembershipState, OwnedUserId, OwnedUserId)> {
|
) -> Result<(CanonicalJsonObject, MembershipState, OwnedUserId, OwnedUserId)> {
|
||||||
let (template_room_id, template_event_id, pdu) = services
|
let (template_room_id, template_event_id, mut pdu) = services
|
||||||
.rooms
|
.rooms
|
||||||
.event_handler
|
.event_handler
|
||||||
.parse_incoming_pdu(body, Some(room_version_rules))
|
.parse_incoming_pdu(body, Some(room_version_rules))
|
||||||
@@ -109,6 +109,37 @@ pub(crate) async fn validate_any_membership_event(
|
|||||||
))));
|
))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only `join` events carry `join_authorised_via_users_server`; co-sign
|
||||||
|
// restricted joins so verification passes. Authorisation is enforced in
|
||||||
|
// create_join_event.
|
||||||
|
let membership_is_join = pdu
|
||||||
|
.get("content")
|
||||||
|
.and_then(|v| v.as_object())
|
||||||
|
.and_then(|c| c.get("membership"))
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.is_some_and(|m| m == "join");
|
||||||
|
|
||||||
|
let authorising_user = pdu
|
||||||
|
.get("content")
|
||||||
|
.and_then(|v| v.as_object())
|
||||||
|
.and_then(|c| c.get("join_authorised_via_users_server"))
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.map(UserId::parse)
|
||||||
|
.and_then(Result::ok);
|
||||||
|
|
||||||
|
if room_version_rules.authorization.restricted_join_rule
|
||||||
|
&& membership_is_join
|
||||||
|
&& let Some(authorising_user) = authorising_user
|
||||||
|
&& services.globals.user_is_local(&authorising_user)
|
||||||
|
{
|
||||||
|
services
|
||||||
|
.server_keys
|
||||||
|
.hash_and_sign_event(&mut pdu, room_version_rules)
|
||||||
|
.map_err(|e| {
|
||||||
|
err!(Request(InvalidParam("Failed to sign restricted join event: {e}")))
|
||||||
|
})?;
|
||||||
|
}
|
||||||
|
|
||||||
services
|
services
|
||||||
.server_keys
|
.server_keys
|
||||||
.verify_event(&pdu, room_version_rules)
|
.verify_event(&pdu, room_version_rules)
|
||||||
|
|||||||
@@ -253,8 +253,6 @@ pub async fn remove_to_device_events<Until>(
|
|||||||
self.db.todeviceid_events.del(key);
|
self.db.todeviceid_events.del(key);
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
self.services.sync.wake(user_id).await;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates device metadata and increments the device list version.
|
/// Updates device metadata and increments the device list version.
|
||||||
|
|||||||
Reference in New Issue
Block a user