mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-04 14:21:50 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b08a47e035 | ||
|
|
2a611fbd49 | ||
|
|
8fb898c84d |
No files matched your search
@@ -17,7 +17,7 @@ go to "files changed", and click on the "+" symbol in the line number gutter,
|
||||
and attach comments to the lines that you think would benefit from some clarification.
|
||||
-->
|
||||
|
||||
This pull request... <!-- do not forget to write here! -->
|
||||
This pull request...
|
||||
|
||||
<!-- Example:
|
||||
This pull request allows us to warp through time and space ten times faster than before by
|
||||
@@ -26,8 +26,8 @@ efficient. This resolves the common issue where we have to wait more than 10 mil
|
||||
engage, use, and disengage the warp drive when travelling between galaxies.
|
||||
-->
|
||||
|
||||
<!-- Closes #... -->
|
||||
<!-- Fixes #... -->
|
||||
<!-- Closes: #... -->
|
||||
<!-- Fixes: #... -->
|
||||
<!-- Uncomment the above line(s) if your pull request fixes an issue or closes another pull request
|
||||
by superseding it. Replace `#...` with the issue/pr number, such as `#123`. -->
|
||||
|
||||
@@ -73,7 +73,6 @@ Notes on these requirements:
|
||||
main, it's difficult to get out cleanly, so put on your best dress, smile for the cameras!
|
||||
-->
|
||||
|
||||
<!-- Do not delete below this line -->
|
||||
[c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md
|
||||
[c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx
|
||||
[c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks
|
||||
|
||||
@@ -64,7 +64,7 @@ repos:
|
||||
- pre-push
|
||||
|
||||
- repo: https://code.forgejo.org/forgejo/runner
|
||||
rev: v13.3.0
|
||||
rev: v13.2.1
|
||||
hooks:
|
||||
- id: forgejo-runner-validate
|
||||
stages:
|
||||
|
||||
Generated
+25
-25
@@ -1026,7 +1026,7 @@ dependencies = [
|
||||
"serde-saphyr",
|
||||
"serde_json",
|
||||
"serde_regex",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
"smallstr",
|
||||
"smallvec",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1152,7 +1152,7 @@ dependencies = [
|
||||
"serde-saphyr",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
"termimad",
|
||||
"tokio",
|
||||
"tracing",
|
||||
@@ -1866,7 +1866,7 @@ dependencies = [
|
||||
"curve25519-dalek",
|
||||
"ed25519",
|
||||
"serde",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
"signature 3.0.0",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
@@ -3245,9 +3245,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lettre"
|
||||
version = "0.11.25"
|
||||
version = "0.11.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "15000d8223b52e56d577590183331413c0ef732ebdd9c9b6aebce15824aba899"
|
||||
checksum = "f294f3d7cdb313e578acef7d7727d4e8d897e0fcd0d6d58c19959cec95073f19"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.23.1",
|
||||
@@ -4182,7 +4182,7 @@ dependencies = [
|
||||
"elliptic-curve 0.14.3",
|
||||
"primefield",
|
||||
"primeorder 0.14.0",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4196,7 +4196,7 @@ dependencies = [
|
||||
"fiat-crypto",
|
||||
"primefield",
|
||||
"primeorder 0.14.0",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5049,7 +5049,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma"
|
||||
version = "0.18.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"assign",
|
||||
"js_int",
|
||||
@@ -5068,7 +5068,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-appservice-api"
|
||||
version = "0.18.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"http",
|
||||
"js_int",
|
||||
@@ -5081,7 +5081,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-client-api"
|
||||
version = "0.26.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"assign",
|
||||
@@ -5103,7 +5103,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-common"
|
||||
version = "0.21.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"base64 0.23.1",
|
||||
@@ -5136,7 +5136,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-events"
|
||||
version = "0.36.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"indexmap 2.14.2",
|
||||
@@ -5157,7 +5157,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-federation-api"
|
||||
version = "0.17.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"http",
|
||||
@@ -5179,7 +5179,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-identifiers-validation"
|
||||
version = "0.14.1"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"thiserror 2.0.21",
|
||||
@@ -5188,7 +5188,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-macros"
|
||||
version = "0.20.3"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"cfg-if",
|
||||
@@ -5204,7 +5204,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-push-gateway-api"
|
||||
version = "0.17.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"ruma-common",
|
||||
@@ -5216,7 +5216,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-signatures"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"ed25519-dalek",
|
||||
@@ -5226,14 +5226,14 @@ dependencies = [
|
||||
"ruma-common",
|
||||
"ruma-events",
|
||||
"serde_json",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ruma-state-res"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
source = "git+https://github.com/gingershaped/ruwuma.git?rev=4eeece8f461b653d16f91064256080e8a959f584#4eeece8f461b653d16f91064256080e8a959f584"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"ruma-common",
|
||||
@@ -5327,9 +5327,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.23.47"
|
||||
version = "0.23.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ac0e747c10d93d873fd4c50b26ef47ad92d1bfb48f6922003bb514070f6e88c"
|
||||
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"log",
|
||||
@@ -5704,7 +5704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "969cde0349344dbbf58b5f9badbfb8f806db13969364eb8007c057ef687007d9"
|
||||
dependencies = [
|
||||
"annotate-snippets",
|
||||
"base64 0.22.1",
|
||||
"base64 0.23.1",
|
||||
"encoding_rs_io",
|
||||
"granit-parser",
|
||||
"nohash-hasher",
|
||||
@@ -5909,9 +5909,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.11.3"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "820083d430c52864bf834423fc988cbcf61685d6f9d22a765a64e3f6cfe3521c"
|
||||
checksum = "5b0e5c7d67bc53f435386b2130fdc900488c5703770f6d8a4633060e34288a27"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures 0.3.1",
|
||||
@@ -7120,7 +7120,7 @@ dependencies = [
|
||||
"hkdf 0.13.0",
|
||||
"http",
|
||||
"p256 0.13.2",
|
||||
"sha2 0.11.3",
|
||||
"sha2 0.11.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
+3
-2
@@ -356,8 +356,8 @@ version = "1.1.1"
|
||||
|
||||
# Used for matrix spec type definitions and helpers
|
||||
[workspace.dependencies.ruma]
|
||||
git = "https://github.com/ruma/ruma.git"
|
||||
rev = "d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
git = "https://github.com/gingershaped/ruwuma.git"
|
||||
rev = "4eeece8f461b653d16f91064256080e8a959f584"
|
||||
features = [
|
||||
"appservice-api-c",
|
||||
"client-api",
|
||||
@@ -390,6 +390,7 @@ features = [
|
||||
"unstable-msc4363",
|
||||
"unstable-msc4406",
|
||||
"unstable-msc4439",
|
||||
"unstable-msc4322",
|
||||
"unstable-msc4354",
|
||||
"unstable-msc4388",
|
||||
"unstable-msc4480",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Fixed read receipts for all but one of a user's threads not being sent over federation. Contributed by @eleboucher.
|
||||
@@ -0,0 +1,3 @@
|
||||
Added unstable support for [MSC4322] media redaction. Contributed by @ginger.
|
||||
|
||||
[MSC4322]: https://github.com/matrix-org/matrix-spec-proposals/pull/4322
|
||||
@@ -1 +0,0 @@
|
||||
The `element_hacks` build feature, which has done almost nothing for many versions, has been removed completely. Contributed by @ginger.
|
||||
@@ -102,7 +102,7 @@ look like this:
|
||||
RUSTFLAGS="--cfg tokio_unstable" cargo +nightly build \
|
||||
--release \
|
||||
--no-default-features \
|
||||
--features=systemd,gzip_compression,brotli_compression,zstd_compression,tokio_console
|
||||
--features=systemd,element_hacks,gzip_compression,brotli_compression,zstd_compression,tokio_console
|
||||
```
|
||||
|
||||
You will also need to enable the `tokio_console` config option in Continuwuity
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ cargo clippy \
|
||||
--locked \
|
||||
--profile test \
|
||||
--no-default-features \
|
||||
--features=console,systemd,direct_tls,perf_measurements,brotli_compression \
|
||||
--features=console,systemd,element_hacks,direct_tls,perf_measurements,brotli_compression \
|
||||
--color=always \
|
||||
-- \
|
||||
-D warnings
|
||||
|
||||
Generated
+95
-132
@@ -16,38 +16,35 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",
|
||||
"integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",
|
||||
"version": "2.0.0-beta.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.3.tgz",
|
||||
"integrity": "sha512-KA+gOBtbifRATmUa/Gpf5C2B2EJ0r4brHUT3XSgACeHREcuiObXH56xd+B3fFsEFbUT04VBEe6MuZiCtMp0tQg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.3",
|
||||
"@emnapi/wasi-threads": "2.2.0",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
|
||||
"integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
|
||||
"version": "2.0.0-beta.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.3.tgz",
|
||||
"integrity": "sha512-ayb/PyyLzpwRyFVxeC0uoEHu59QlB1iWGcGsOpXQcaB/Dc+uGfBmNmpCHp3HmTT0t8lSsMmg3j7+tdJW/TlHjQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",
|
||||
"integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz",
|
||||
"integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
@@ -131,13 +128,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rsbuild/core": {
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.7.tgz",
|
||||
"integrity": "sha512-IvJZFEeVGcjeSiSHfMlRxJbyL5+xLGcvkNmD34wmIXo85n0va6b8cnqShmprdUKjvXyzE4dPPB9trRunaUY+mA==",
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.6.tgz",
|
||||
"integrity": "sha512-IVuWh/0DO6XT8075eCAzxWIcVGA7c4xKggf/VEePq3yXqEiU302n6OVGD7uCxQwPaB4R9ViX4cAqalcQV/sxKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/core": "~2.3.5",
|
||||
"@rspack/core": "~2.3.4",
|
||||
"@swc/helpers": "^0.5.24"
|
||||
},
|
||||
"bin": {
|
||||
@@ -175,32 +172,32 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.5.tgz",
|
||||
"integrity": "sha512-W3x7zw5d/mIH9WhWt4pO9RKYURoqgdUxeLSV5IhDCajnhXdRr7R59u5S2j5ZXzSk3eMGUC0PenfKIIdW7t0ufQ==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.4.tgz",
|
||||
"integrity": "sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optionalDependencies": {
|
||||
"@rspack/binding-darwin-arm64": "2.3.5",
|
||||
"@rspack/binding-darwin-x64": "2.3.5",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.3.5",
|
||||
"@rspack/binding-linux-arm64-musl": "2.3.5",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.3.5",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.3.5",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.3.5",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.3.5",
|
||||
"@rspack/binding-linux-x64-gnu": "2.3.5",
|
||||
"@rspack/binding-linux-x64-musl": "2.3.5",
|
||||
"@rspack/binding-wasm32-wasi": "2.3.5",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.3.5",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.3.5",
|
||||
"@rspack/binding-win32-x64-msvc": "2.3.5"
|
||||
"@rspack/binding-darwin-arm64": "2.3.4",
|
||||
"@rspack/binding-darwin-x64": "2.3.4",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-arm64-musl": "2.3.4",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.3.4",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-x64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-x64-musl": "2.3.4",
|
||||
"@rspack/binding-wasm32-wasi": "2.3.4",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.3.4",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.3.4",
|
||||
"@rspack/binding-win32-x64-msvc": "2.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-arm64": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.5.tgz",
|
||||
"integrity": "sha512-A5XnBdSoJvcYV4t2Y+XJiCF0UZ42nOKE2D0ZlegfErGhzlQG1t3hDOzskSB2fPD3z+w5QeREoclqQ0zFOZyBpw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.4.tgz",
|
||||
"integrity": "sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -212,9 +209,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-x64": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.5.tgz",
|
||||
"integrity": "sha512-iZrweqTIj2cM4f0ADRj6FXn9a0FOpD1Mx/++zrsbrQzmnY0c8wmfpvZ5xA5Zfcq9O6nuUBS6GnhkmoFTgviHwQ==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.4.tgz",
|
||||
"integrity": "sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -226,9 +223,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.5.tgz",
|
||||
"integrity": "sha512-aWE9V0ZhmclKsJNuO37cxUMLtXMjhLtFzrWDWC82mksUX6qM2rzOpPuye9i/c9NGqyrIH7EFQre8bskJvNHGuQ==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -243,9 +240,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.5.tgz",
|
||||
"integrity": "sha512-I8ENTXdv7Th/OHEYhL7uu3B7DA9r1oTWSifkGHJtuT1XJ0KDsxoA6ORpYz1R2qIs87l+8+5QUnRH7iWyZrnroA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -260,9 +257,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-ppc64-gnu": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.5.tgz",
|
||||
"integrity": "sha512-ps5do0cKf4aTBWd+LHqvwm8Gdn7J/gvzmx9pWJhAIThvzii45wJREFjGOzJNxdQl+pzKq8JFuzbShNskCN9k2w==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -277,9 +274,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-gnu": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.5.tgz",
|
||||
"integrity": "sha512-3XXIEMS4SSr1/9wIAGgPT1oj1SzhnlejAG5xeVbGJR5y6iFp/oFKYzUPqyuuzZCkWph2/hJ+Q16sa+BJn1YIkg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -294,9 +291,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-musl": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.5.tgz",
|
||||
"integrity": "sha512-z2DbQNcLbUEY9OvUa3gahsHey+dW4acLc9d3QlyJm7TJE//rL9C/XBk4kETvCgtdhqrwBSfWrZfislBPKODjvA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -311,9 +308,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-s390x-gnu": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.5.tgz",
|
||||
"integrity": "sha512-n2UudDpzt9G2AOmycVS7uWRMcNMd2k4ubU4b4SX3FfU/uT6mfSNzuwhBhCi0RSZQAGBU0ombJ+sqw8vKXjGGbw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -328,9 +325,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.5.tgz",
|
||||
"integrity": "sha512-1sxASGJXg9luaYsFSmAQxSFbUbnMnPA5Mr94yIlLsq4q94sHUIn5YjG1XGcT+cPhUYF9fHkCsKRmQlzrN9fR8A==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -345,9 +342,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.5.tgz",
|
||||
"integrity": "sha512-/S4pe1wAo8CBTs0X8DNKu1ZOJ2vQcnThLBKS2CxOPiuQXI7UfAsJCEABBoa8yCrZANWh63fJ90UwLb/s245Gsw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -362,9 +359,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.5.tgz",
|
||||
"integrity": "sha512-GQnswrv6AyBdDCcTy8dTVhD0JqnvmgewzPz6qnOYWGKxpCY99Bv6FL4jvxI1yh64Uk3ykEfbwhrPnaA8Px4KJA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.4.tgz",
|
||||
"integrity": "sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
@@ -372,49 +369,15 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/core": "2.0.0-beta.4",
|
||||
"@emnapi/runtime": "2.0.0-beta.4",
|
||||
"@emnapi/core": "2.0.0-beta.3",
|
||||
"@emnapi/runtime": "2.0.0-beta.3",
|
||||
"@napi-rs/wasm-runtime": "1.2.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi/node_modules/@emnapi/core": {
|
||||
"version": "2.0.0-beta.4",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.4.tgz",
|
||||
"integrity": "sha512-AhU/vMMXtGgLCrWsL3PjZGSpCWXlGETabnyyB2pBUd6h7AMy2toffJO2T7yXOYXtw8FyD6dYK/5b3u5eRK3yhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "2.2.0",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi/node_modules/@emnapi/runtime": {
|
||||
"version": "2.0.0-beta.4",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.4.tgz",
|
||||
"integrity": "sha512-UKxc3beuftD67T1mPCVf0mnwRKOBsq9XrhLCDGGQKsbG9jx6osvGyjIbJm9DsucyUtFSMTV2ZxsjiuTMjEqWkA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz",
|
||||
"integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.5.tgz",
|
||||
"integrity": "sha512-XVKu3Zs5KGr+P5Seh6NtSNU0UQ1GSgSDFANQRZlT1uFZ1NpBCX+9NB8FVZB0hBBoBKI1kU4b0Cr6Df1Xx0K4nQ==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -426,9 +389,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.5.tgz",
|
||||
"integrity": "sha512-ejCqSuctPcOev2dyi0ayZyfIUY3fJdYHYvrTfSVrrGC19TspuRATXu+RLyu3xvB6TrQF3+JEF4KeG4/ZeWuXOg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -440,9 +403,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.5.tgz",
|
||||
"integrity": "sha512-IPvkjM3xAwL1z2N4Jp/GBcZUme703uDy5vrP1IMtXJEl/EOLLfwl7cRb4sSzdeOYGDDHs5dPYDcpgP5eRSRauA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -454,13 +417,13 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/core": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.5.tgz",
|
||||
"integrity": "sha512-4TG6zGTemEU/FU7bymDgeFOO7CRdd7ucn0CmXo+3cG6EhYmY5+hpAFYBRgxDbDuL4Bwo/s5GsgUvZuI7rLqVbQ==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.4.tgz",
|
||||
"integrity": "sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/binding": "2.3.5"
|
||||
"@rspack/binding": "2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
@@ -495,22 +458,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/core": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.1.6.tgz",
|
||||
"integrity": "sha512-a+CBJcslana9Zmr6j2o3RP6O19y+rcyfa8jeDToC1b29e/RGiD+xpAQJF2eBvnjNUHouXARTaFa7pE1myyV0Rg==",
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.1.5.tgz",
|
||||
"integrity": "sha512-kzTqrfJ4UiW+RLLHLunoW/rET5Vjb6Qz4YjhEhiWEp4HYM+KxLVhfyYB5aL8af9+mdnwiTaqlu1s+BZGrMD2zw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^3.1.1",
|
||||
"@mdx-js/react": "^3.1.1",
|
||||
"@rsbuild/core": "^2.3.7",
|
||||
"@rsbuild/core": "^2.3.3",
|
||||
"@rsbuild/plugin-react": "~2.1.1",
|
||||
"@rspress/shared": "2.1.6",
|
||||
"@rspress/shared": "2.1.5",
|
||||
"@shikijs/rehype": "^4.2.0",
|
||||
"@shikijs/transformers": "^4.2.0",
|
||||
"@types/mdast": "^4.0.4",
|
||||
"@types/react": "^19.3.3",
|
||||
"@unhead/react": "^2.1.19",
|
||||
"@types/react": "^19.3.0",
|
||||
"@unhead/react": "^2.1.18",
|
||||
"body-scroll-lock": "4.0.0-beta.0",
|
||||
"clsx": "2.1.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
@@ -527,7 +490,7 @@
|
||||
"react-dom": "^19.3.1",
|
||||
"react-lazy-with-preload": "^2.2.1",
|
||||
"react-render-to-markdown": "19.2.0",
|
||||
"react-router-dom": "^7.18.7",
|
||||
"react-router-dom": "^7.18.6",
|
||||
"rehype-external-links": "^3.0.0",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"remark-cjk-friendly": "^2.3.4",
|
||||
@@ -551,9 +514,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/plugin-client-redirects": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.1.6.tgz",
|
||||
"integrity": "sha512-lnSIA3oD44PZa0o0r4gvTBBGWeImD3T7D28FRJlzCdrWQX3kOHpyhxd9fCcK9mE32DYItlu/ipsmpSozmDN9ZA==",
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.1.5.tgz",
|
||||
"integrity": "sha512-vqAi7ynOgVsuwJi7cXwWEF5UgoNhXqGOyBfQubeZHZKWRtdNHRU42P9rG9DZLTss2dZUiDKlVrM2/vNY40t5hw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -564,15 +527,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/shared": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.1.6.tgz",
|
||||
"integrity": "sha512-ecHmNItlMsMU5FEf0CeBKZa4XNCE5fpwCED+1/lmcwIhozyBvd4j4Ook/8IyTT3UqgruJDZ2DwQqfyvCW7zmLg==",
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.1.5.tgz",
|
||||
"integrity": "sha512-XXxegxRZ7VPADS2veN9FTNmmLlA65ieydKH0tOhOZbMJC4OJpKbr/d/JS2jxxAO4u+ZmZxbDyEEir83NQHLKIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rsbuild/core": "^2.3.7",
|
||||
"@rsbuild/core": "^2.3.3",
|
||||
"@shikijs/rehype": "^4.2.0",
|
||||
"@types/react": "^19.3.3",
|
||||
"@types/react": "^19.3.0",
|
||||
"mdast-util-mdx-jsx": "^3.2.2",
|
||||
"unified": "^11.0.5"
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ brotli_compression = [
|
||||
"conduwuit-service/brotli_compression",
|
||||
"reqwest/brotli",
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-service/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"conduwuit-service/gzip_compression",
|
||||
|
||||
+22
-1
@@ -18,7 +18,7 @@ use ruma::{
|
||||
get_content, get_content_as_filename, get_content_thumbnail, get_media_config,
|
||||
get_media_preview,
|
||||
},
|
||||
media::create_content,
|
||||
media::{self, create_content},
|
||||
},
|
||||
};
|
||||
use service::media::mxc::Mxc;
|
||||
@@ -240,6 +240,27 @@ pub(crate) async fn get_media_preview_route(
|
||||
})
|
||||
}
|
||||
|
||||
/// # `POST /_matrix/client/unstable/uk.timedout.msc4322/media/redact/{server_name}/{media_id}`
|
||||
pub(crate) async fn unstable_redact_media_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<media::redact::msc4322::Request>,
|
||||
) -> Result<media::redact::msc4322::Response> {
|
||||
let user = body.identity.expect_sender_user()?;
|
||||
|
||||
let mxc = Mxc {
|
||||
server_name: &body.server_name,
|
||||
media_id: &body.media_id,
|
||||
};
|
||||
|
||||
if !(services.media.user_owns(user, &mxc).await || services.admin.user_is_admin(user).await) {
|
||||
return Err!(Request(Forbidden("You cannot redact this media.")));
|
||||
}
|
||||
|
||||
services.media.redact(&mxc).await?;
|
||||
|
||||
Ok(media::redact::msc4322::Response::new())
|
||||
}
|
||||
|
||||
async fn fetch_thumbnail_meta(
|
||||
services: &Services,
|
||||
mxc: &Mxc<'_>,
|
||||
|
||||
@@ -2,7 +2,6 @@ use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Result};
|
||||
use conduwuit_service::sending::EduBuf;
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{
|
||||
@@ -44,9 +43,8 @@ pub(crate) async fn send_event_to_device_route(
|
||||
messages.insert(target_user_id.clone(), map);
|
||||
let count = services.globals.next_count()?;
|
||||
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(
|
||||
&mut buf,
|
||||
services.sending.send_edu_server(
|
||||
target_user_id.server_name(),
|
||||
&Edu::DirectToDevice(assign!(
|
||||
DirectDeviceContent::new(
|
||||
sender_user.to_owned(),
|
||||
@@ -55,12 +53,7 @@ pub(crate) async fn send_event_to_device_route(
|
||||
),
|
||||
{ messages }
|
||||
)),
|
||||
)
|
||||
.expect("DirectToDevice EDU can be serialized");
|
||||
|
||||
services
|
||||
.sending
|
||||
.send_edu_server(target_user_id.server_name(), buf)?;
|
||||
)?;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -158,6 +158,7 @@ pub fn build(router: Router<State>, state: State) -> Router<State> {
|
||||
.ruma_route(&client::get_content_as_filename_route)
|
||||
.ruma_route(&client::get_media_preview_route)
|
||||
.ruma_route(&client::get_media_config_route)
|
||||
.ruma_route(&client::unstable_redact_media_route)
|
||||
.ruma_route(&client::get_devices_route)
|
||||
.ruma_route(&client::get_device_route)
|
||||
.ruma_route(&client::update_device_route)
|
||||
|
||||
@@ -38,6 +38,10 @@ pub(crate) async fn get_content_route(
|
||||
content_disposition,
|
||||
);
|
||||
|
||||
services
|
||||
.media
|
||||
.track_remote_download(&body.identity, &body.media_id);
|
||||
|
||||
Ok(get_content::v1::Response::new(
|
||||
ContentMetadata::new(),
|
||||
FileOrLocation::File(content),
|
||||
|
||||
@@ -55,6 +55,7 @@ default = [
|
||||
standard = [
|
||||
"brotli_compression",
|
||||
"direct_tls",
|
||||
"element_hacks",
|
||||
"gzip_compression",
|
||||
"io_uring",
|
||||
"jemalloc_conf",
|
||||
@@ -85,6 +86,10 @@ console = [
|
||||
direct_tls = [
|
||||
"conduwuit-router/direct_tls"
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-service/element_hacks",
|
||||
"conduwuit-router/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"conduwuit-router/gzip_compression",
|
||||
|
||||
@@ -27,6 +27,9 @@ direct_tls = [
|
||||
"axum-server/tls-rustls-no-provider",
|
||||
"dep:axum-server-dual-protocol",
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-api/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-admin/gzip_compression",
|
||||
"conduwuit-api/gzip_compression",
|
||||
|
||||
@@ -30,6 +30,7 @@ console = [
|
||||
"dep:rustyline-async",
|
||||
"dep:termimad",
|
||||
]
|
||||
element_hacks = []
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"reqwest/gzip",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use std::{
|
||||
any::TypeId,
|
||||
borrow::Cow,
|
||||
fmt::Debug,
|
||||
mem,
|
||||
@@ -126,7 +125,6 @@ impl super::Service {
|
||||
where
|
||||
T: OutgoingRequest<PathBuilder: PathBuilder<Input<'i> = PathBuilderInput>> + Send,
|
||||
PathBuilderInput: FederationPathBuilderInput,
|
||||
<T as ruma::api::Metadata>::Authentication: 'static,
|
||||
{
|
||||
if !self.services.server.config.allow_federation {
|
||||
return Err!(Config("allow_federation", "Federation is disabled."));
|
||||
@@ -138,21 +136,7 @@ impl super::Service {
|
||||
))));
|
||||
}
|
||||
|
||||
// Don't check health on unauthenticated requests, since those are only
|
||||
// for keys and manual pings, which want to bypass health tracking
|
||||
// anyway.
|
||||
//
|
||||
// TODO(nex): We should probably do a proper builder pattern for
|
||||
// requests, since callers may wish to tune
|
||||
// - Authentication (signed vs unsigned)
|
||||
// - Health check activity
|
||||
// - Timeout (normal vs slow)
|
||||
// and having a billion functions and conditions for all of those is not
|
||||
// ideal.
|
||||
let doctor = TypeId::of::<T::Authentication>() != TypeId::of::<NoAuthentication>();
|
||||
if doctor {
|
||||
self.ensure_remote_is_healthy(dest)?;
|
||||
}
|
||||
self.ensure_remote_is_healthy(dest)?;
|
||||
|
||||
/// How long to wait with re-resolution if a server fails to resolve
|
||||
const UNRESOLVABLE_RETRY_AFTER: Duration = Duration::from_hours(24 * 90);
|
||||
@@ -176,8 +160,7 @@ impl super::Service {
|
||||
self.validate_url(request.url())?;
|
||||
self.services.server.check_running()?;
|
||||
|
||||
self.perform::<T>(dest, &actual, request, client, doctor)
|
||||
.await
|
||||
self.perform::<T>(dest, &actual, request, client).await
|
||||
}
|
||||
|
||||
/// Actually sends the federation request, handling the response before
|
||||
@@ -190,7 +173,6 @@ impl super::Service {
|
||||
actual: &Resolution,
|
||||
request: Request,
|
||||
client: &Client,
|
||||
doctor: bool,
|
||||
) -> Result<T::IncomingResponse>
|
||||
where
|
||||
T: OutgoingRequest + Send,
|
||||
@@ -226,10 +208,8 @@ impl super::Service {
|
||||
.record(elapsed.as_secs_f64(), &[KeyValue::new("outcome", outcome)]);
|
||||
match response {
|
||||
| Ok(response) =>
|
||||
self.handle_response::<T>(dest, actual, &method, &url, response, doctor)
|
||||
self.handle_response::<T>(dest, actual, &method, &url, response)
|
||||
.await,
|
||||
| Err(error) if !doctor =>
|
||||
Err(handle_error(actual, &method, &url, error).expect_err("always returns error")),
|
||||
| Err(error) => {
|
||||
// This awful wrapping hack is required because `reqwest::Error`
|
||||
// does not implement `Clone`, but we need to convert it
|
||||
@@ -275,7 +255,6 @@ impl super::Service {
|
||||
method: &Method,
|
||||
url: &Url,
|
||||
response: Response,
|
||||
doctor: bool,
|
||||
) -> Result<T::IncomingResponse>
|
||||
where
|
||||
T: OutgoingRequest + Send,
|
||||
@@ -304,17 +283,13 @@ impl super::Service {
|
||||
body.as_ref(),
|
||||
))
|
||||
.inspect(|_| {
|
||||
if doctor {
|
||||
self.mark_healthy(dest);
|
||||
}
|
||||
self.mark_healthy(dest);
|
||||
})
|
||||
.map_err(|e| {
|
||||
if doctor {
|
||||
// Bad 200 response is usually a sign of bad routing, so we'll
|
||||
// mark as stale. We won't mark as offline though since we
|
||||
// technically got a response.
|
||||
self.mark_destination_stale(dest);
|
||||
}
|
||||
// Bad 200 response is usually a sign of bad routing, so we'll mark
|
||||
// as stale. We won't mark as offline though since we technically
|
||||
// got a response.
|
||||
self.mark_destination_stale(dest);
|
||||
err!(BadServerResponse("Server returned bad 200 response: {e:?}"))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use std::{collections::HashSet, sync::Arc, time::Duration};
|
||||
|
||||
use conduwuit::{
|
||||
Err, Result, debug, debug_info, err,
|
||||
Err, Result, at, debug, debug_info, err,
|
||||
utils::{ReadyExt, str_from_bytes, stream::TryIgnore, string_from_bytes},
|
||||
};
|
||||
use database::{Database, Interfix, Map};
|
||||
use futures::StreamExt;
|
||||
use ruma::{OwnedMxcUri, OwnedUserId, UserId, http_headers::ContentDisposition};
|
||||
use ruma::{
|
||||
OwnedMxcUri, OwnedServerName, OwnedUserId, ServerName, UserId,
|
||||
http_headers::ContentDisposition,
|
||||
};
|
||||
|
||||
use super::{preview::UrlPreviewData, thumbnail::Dim};
|
||||
use crate::media::mxc::Mxc;
|
||||
@@ -15,6 +18,8 @@ pub(crate) struct Data {
|
||||
mediaid_file: Arc<Map>,
|
||||
mediaid_user: Arc<Map>,
|
||||
url_previews: Arc<Map>,
|
||||
mediaidremote_remotedownload: Arc<Map>,
|
||||
mediaid_redacted: Arc<Map>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -30,6 +35,8 @@ impl Data {
|
||||
mediaid_file: db["mediaid_file"].clone(),
|
||||
mediaid_user: db["mediaid_user"].clone(),
|
||||
url_previews: db["url_previews"].clone(),
|
||||
mediaidremote_remotedownload: db["mediaidremote_remotedownload"].clone(),
|
||||
mediaid_redacted: db["mediaid_redacted"].clone(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,4 +337,22 @@ impl Data {
|
||||
* I'll do it later. */
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) fn track_remote_download(&self, remote: &ServerName, media_id: &str) {
|
||||
self.mediaidremote_remotedownload
|
||||
.put_raw((media_id, remote), []);
|
||||
}
|
||||
|
||||
pub(super) async fn find_remote_downloads(&self, media_id: &str) -> HashSet<OwnedServerName> {
|
||||
self.mediaidremote_remotedownload
|
||||
.keys_prefix::<(String, OwnedServerName), _>(media_id)
|
||||
.ignore_err()
|
||||
.map(at!(1))
|
||||
.collect()
|
||||
.await
|
||||
}
|
||||
|
||||
pub(super) fn mark_redacted(&self, media_id: &str) {
|
||||
self.mediaid_redacted.insert(media_id, []);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ mod preview;
|
||||
mod remote;
|
||||
mod tests;
|
||||
mod thumbnail;
|
||||
use std::{path::PathBuf, sync::Arc, time::SystemTime};
|
||||
use std::{collections::HashSet, path::PathBuf, sync::Arc, time::SystemTime};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
@@ -19,7 +19,11 @@ use conduwuit::{
|
||||
},
|
||||
warn,
|
||||
};
|
||||
use ruma::{OwnedMxcUri, UserId, http_headers::ContentDisposition};
|
||||
use ruma::{
|
||||
OwnedMxcUri, OwnedServerName, ServerName, UserId,
|
||||
api::federation::transactions::edu::{Edu, MediaRedactionContent},
|
||||
http_headers::ContentDisposition,
|
||||
};
|
||||
use tokio::{
|
||||
fs,
|
||||
io::{AsyncReadExt, AsyncWriteExt, BufReader},
|
||||
@@ -171,6 +175,31 @@ impl Service {
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark a media file as redacted and delete it from the database.
|
||||
pub async fn redact(&self, mxc: &Mxc<'_>) -> Result<()> {
|
||||
self.db.mark_redacted(mxc.media_id);
|
||||
self.delete(mxc).await?;
|
||||
|
||||
let edu = Edu::MediaRedaction(MediaRedactionContent::new(mxc.media_id.to_owned()));
|
||||
|
||||
for server in self.find_remote_downloads(mxc.media_id).await {
|
||||
if let Err(err) = self.services.sending.send_edu_server(&server, &edu) {
|
||||
error!(?server, %mxc, ?err, "Failed to queue media redaction EDU");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Check if a user uploaded a file with the given MXC.
|
||||
pub async fn user_owns(&self, user: &UserId, mxc: &Mxc<'_>) -> bool {
|
||||
// TODO: do this more efficiently when we refactor this garbage fire of
|
||||
// a service
|
||||
|
||||
let mxc = OwnedMxcUri::from(mxc.to_string());
|
||||
self.db.get_all_user_mxcs(user).await.contains(&mxc)
|
||||
}
|
||||
|
||||
/// Deletes all media by the specified user
|
||||
///
|
||||
/// currently, this is only practical for local users
|
||||
@@ -263,6 +292,20 @@ impl Service {
|
||||
Ok(mxcs)
|
||||
}
|
||||
|
||||
/// Mark a remote server as having downloaded a media file.
|
||||
pub fn track_remote_download(&self, remote: &ServerName, media_id: &str) {
|
||||
self.db.track_remote_download(remote, media_id);
|
||||
}
|
||||
|
||||
/// Find all remote servers that have downloaded the local media file with
|
||||
/// the given ID.
|
||||
pub fn find_remote_downloads(
|
||||
&self,
|
||||
media_id: &str,
|
||||
) -> impl Future<Output = HashSet<OwnedServerName>> {
|
||||
self.db.find_remote_downloads(media_id)
|
||||
}
|
||||
|
||||
/// Deletes all media files in the given time frame.
|
||||
/// Returns a usize with the amount of media files deleted.
|
||||
pub async fn delete_all_media_within_timeframe(
|
||||
|
||||
@@ -75,7 +75,8 @@ impl Service {
|
||||
"lazy loading should be enabled by your options"
|
||||
);
|
||||
|
||||
let include_redundant = ctx.options.is_some_and(Options::include_redundant_members);
|
||||
let include_redundant = cfg!(feature = "element_hacks")
|
||||
|| ctx.options.is_some_and(Options::include_redundant_members);
|
||||
|
||||
let witness = self
|
||||
.witness(ctx, senders.iter().map(AsRef::as_ref))
|
||||
|
||||
@@ -23,11 +23,7 @@ use ruma::{
|
||||
};
|
||||
|
||||
use self::data::{Data, ReceiptItem};
|
||||
use crate::{
|
||||
Dep, rooms,
|
||||
sending::{self, EduBuf},
|
||||
sync,
|
||||
};
|
||||
use crate::{Dep, rooms, sending, sync};
|
||||
|
||||
pub struct Service {
|
||||
services: Services,
|
||||
@@ -72,12 +68,10 @@ impl Service {
|
||||
self.services.sync.wake_all_joined(room_id).await;
|
||||
// update appservices
|
||||
let edu = EphemeralData::Receipt(event);
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &edu).expect("Serialized EphemeralData::Receipt");
|
||||
_ = self
|
||||
.services
|
||||
.sending
|
||||
.send_edu_appservice_room(room_id, buf)
|
||||
.send_edu_appservice_room(room_id, &edu)
|
||||
.await
|
||||
.log_err();
|
||||
}
|
||||
@@ -160,19 +154,17 @@ impl Service {
|
||||
)]),
|
||||
)]),
|
||||
)];
|
||||
let event = ReceiptEvent::new(
|
||||
room_id.to_owned(),
|
||||
ReceiptEventContent::from_iter(receipt_content),
|
||||
);
|
||||
let edu = EphemeralData::Receipt(event);
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &edu).expect("Serialized EphemeralData::Receipt");
|
||||
_ = self
|
||||
.services
|
||||
.sending
|
||||
.send_edu_appservice_room_filtered(room_id, buf, |appservice| {
|
||||
appservice.is_user_match(user_id)
|
||||
})
|
||||
.send_edu_appservice_room_filtered(
|
||||
room_id,
|
||||
&EphemeralData::Receipt(ReceiptEvent::new(
|
||||
room_id.to_owned(),
|
||||
ReceiptEventContent::from_iter(receipt_content),
|
||||
)),
|
||||
|appservice| appservice.is_user_match(user_id),
|
||||
)
|
||||
.await
|
||||
.log_err();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ use ruma::{
|
||||
events::{EphemeralRoomEvent, SyncEphemeralRoomEvent, typing::TypingEventContent},
|
||||
};
|
||||
|
||||
use crate::{Dep, globals, sending, sending::EduBuf, sync, users};
|
||||
use crate::{Dep, globals, sending, sync, users};
|
||||
|
||||
pub struct Service {
|
||||
server: Arc<Server>,
|
||||
@@ -244,13 +244,9 @@ impl Service {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let content = TypingContent::new(room_id.to_owned(), user_id.to_owned(), typing);
|
||||
let edu = Edu::Typing(content);
|
||||
let edu = Edu::Typing(TypingContent::new(room_id.to_owned(), user_id.to_owned(), typing));
|
||||
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &edu).expect("Serialized Edu::Typing");
|
||||
|
||||
self.services.sending.send_edu_room(room_id, buf).await?;
|
||||
self.services.sending.send_edu_room(room_id, &edu).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -261,12 +257,9 @@ impl Service {
|
||||
self.typings_content(room_id),
|
||||
));
|
||||
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &edu).expect("Serialized Edu::Typing");
|
||||
|
||||
self.services
|
||||
.sending
|
||||
.send_edu_appservice_room(room_id, buf)
|
||||
.send_edu_appservice_room(room_id, &edu)
|
||||
.await
|
||||
}
|
||||
}
|
||||
+28
-22
@@ -30,8 +30,9 @@ use futures::{FutureExt, Stream, StreamExt, stream::FuturesUnordered};
|
||||
use ruma::{
|
||||
OwnedServerName, RoomId, ServerName, UserId,
|
||||
api::{
|
||||
OutgoingRequest, auth_scheme::NoAuthentication,
|
||||
federation::authentication::ServerSignatures, path_builder::PathBuilder,
|
||||
OutgoingRequest,
|
||||
appservice::event::push_events::v1::EphemeralData, auth_scheme::NoAuthentication,
|
||||
federation::{authentication::ServerSignatures, transactions::edu::Edu}, path_builder::PathBuilder,
|
||||
},
|
||||
};
|
||||
use tokio::{task, task::JoinSet, time::sleep};
|
||||
@@ -278,10 +279,12 @@ impl Service {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, server, serialized), level = "debug")]
|
||||
pub fn send_edu_server(&self, server: &ServerName, serialized: EduBuf) -> Result {
|
||||
#[tracing::instrument(skip(self, server, edu), level = "debug")]
|
||||
pub fn send_edu_server(&self, server: &ServerName, edu: &Edu) -> Result {
|
||||
let dest = Destination::Federation(server.to_owned());
|
||||
let event = SendingEvent::Edu(serialized);
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, edu).expect("should be able to serialize edu");
|
||||
let event = SendingEvent::Edu(buf);
|
||||
let _cork = self.db.db.cork();
|
||||
let keys = self.db.queue_requests(once((&event, &dest)));
|
||||
self.dispatch(Msg {
|
||||
@@ -291,10 +294,12 @@ impl Service {
|
||||
})
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, serialized), level = "debug")]
|
||||
pub fn send_edu_appservice(&self, appservice_id: &str, serialized: EduBuf) -> Result {
|
||||
#[tracing::instrument(skip(self, edu), level = "debug")]
|
||||
pub fn send_edu_appservice(&self, appservice_id: &str, edu: &EphemeralData) -> Result {
|
||||
let dest = Destination::Appservice(appservice_id.to_owned());
|
||||
let event = SendingEvent::Edu(serialized);
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, edu).expect("should be able to serialize edu");
|
||||
let event = SendingEvent::Edu(buf);
|
||||
let _cork = self.db.db.cork();
|
||||
let keys = self.db.queue_requests(once((&event, &dest)));
|
||||
self.dispatch(Msg {
|
||||
@@ -304,21 +309,21 @@ impl Service {
|
||||
})
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, room_id, serialized), level = "debug")]
|
||||
#[tracing::instrument(skip(self, room_id, edu), level = "debug")]
|
||||
pub async fn send_edu_appservice_room(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
serialized: EduBuf,
|
||||
edu: &EphemeralData,
|
||||
) -> Result<()> {
|
||||
self.send_edu_appservice_room_filtered(room_id, serialized, |_| true)
|
||||
self.send_edu_appservice_room_filtered(room_id, edu, |_| true)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, room_id, serialized, filter), level = "debug")]
|
||||
#[tracing::instrument(skip(self, room_id, edu, filter), level = "debug")]
|
||||
pub async fn send_edu_appservice_room_filtered<F>(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
serialized: EduBuf,
|
||||
edu: &EphemeralData,
|
||||
filter: F,
|
||||
) -> Result<()>
|
||||
where
|
||||
@@ -350,7 +355,7 @@ impl Service {
|
||||
|| matching_aliases(appservice.aliases.clone()).await
|
||||
{
|
||||
_ = self
|
||||
.send_edu_appservice(&appservice.registration.id, serialized.clone())
|
||||
.send_edu_appservice(&appservice.registration.id, edu)
|
||||
.inspect_err(|e| {
|
||||
warn!(
|
||||
"failed to send EDU to appservice {}: {e:?}",
|
||||
@@ -362,26 +367,27 @@ impl Service {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, room_id, serialized), level = "debug")]
|
||||
pub async fn send_edu_room(&self, room_id: &RoomId, serialized: EduBuf) -> Result {
|
||||
#[tracing::instrument(skip(self, room_id, edu), level = "debug")]
|
||||
pub async fn send_edu_room(&self, room_id: &RoomId, edu: &Edu) -> Result {
|
||||
let servers = self
|
||||
.services
|
||||
.state_cache
|
||||
.room_servers(room_id)
|
||||
.ready_filter(|server_name| !self.services.globals.server_is_ours(server_name));
|
||||
|
||||
self.send_edu_servers(servers, serialized).await
|
||||
self.send_edu_servers(servers, edu).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, servers, serialized), level = "debug")]
|
||||
pub async fn send_edu_servers<S>(&self, servers: S, serialized: EduBuf) -> Result
|
||||
#[tracing::instrument(skip(self, servers, edu), level = "debug")]
|
||||
pub async fn send_edu_servers<S>(&self, servers: S, edu: &Edu) -> Result
|
||||
where
|
||||
S: Stream<Item = OwnedServerName> + Send,
|
||||
{
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, edu).expect("should be able to serialize edu");
|
||||
|
||||
let requests = servers
|
||||
.map(|server| {
|
||||
(Destination::Federation(server), SendingEvent::Edu(serialized.clone()))
|
||||
})
|
||||
.map(|server| (Destination::Federation(server), SendingEvent::Edu(buf.clone())))
|
||||
.collect::<Vec<_>>()
|
||||
.await;
|
||||
|
||||
|
||||
@@ -522,6 +522,13 @@ impl Service {
|
||||
let device_changes =
|
||||
self.select_edus_device_changes(server_name, batch, &max_edu_count, &events_len);
|
||||
|
||||
let receipts: OptionFuture<_> = self
|
||||
.server
|
||||
.config
|
||||
.allow_outgoing_read_receipts
|
||||
.then(|| self.select_edus_receipts(server_name, batch, &max_edu_count))
|
||||
.into();
|
||||
|
||||
let presence: OptionFuture<_> = self
|
||||
.server
|
||||
.config
|
||||
@@ -529,20 +536,11 @@ impl Service {
|
||||
.then(|| self.select_edus_presence(server_name, batch, &max_edu_count))
|
||||
.into();
|
||||
|
||||
let (device_changes, presence) = join!(device_changes, presence);
|
||||
let (device_changes, receipts, presence) = join!(device_changes, receipts, presence);
|
||||
|
||||
let mut events = device_changes;
|
||||
events.extend(presence.into_iter().flatten());
|
||||
|
||||
// leave a slot for the queued event, but always allow one receipt EDU
|
||||
let edu_limit = (EDU_LIMIT - 1).saturating_sub(events.len()).max(1);
|
||||
if self.server.config.allow_outgoing_read_receipts {
|
||||
// must be selected last, as it may lower max_edu_count
|
||||
events.extend(
|
||||
self.select_edus_receipts(server_name, batch, &max_edu_count, edu_limit)
|
||||
.await,
|
||||
);
|
||||
}
|
||||
events.extend(receipts.into_iter().flatten());
|
||||
|
||||
// TODO(nex): some EDUs like typing need flattening
|
||||
|
||||
@@ -618,11 +616,9 @@ impl Service {
|
||||
server_name: &ServerName,
|
||||
since: (u64, u64),
|
||||
max_edu_count: &AtomicU64,
|
||||
edu_limit: usize,
|
||||
) -> EduVec {
|
||||
) -> Option<EduBuf> {
|
||||
let num = AtomicUsize::new(0);
|
||||
let deferred = AtomicU64::new(u64::MAX);
|
||||
let rooms: Vec<_> = self
|
||||
let receipts: BTreeMap<OwnedRoomId, ReceiptMap> = self
|
||||
.services
|
||||
.state_cache
|
||||
.server_rooms(server_name)
|
||||
@@ -631,54 +627,33 @@ impl Service {
|
||||
return None;
|
||||
}
|
||||
|
||||
let maps = self
|
||||
.select_edus_receipts_room(
|
||||
&room_id,
|
||||
since,
|
||||
max_edu_count,
|
||||
&num,
|
||||
edu_limit,
|
||||
&deferred,
|
||||
)
|
||||
let receipt_map = self
|
||||
.select_edus_receipts_room(&room_id, since, max_edu_count, &num)
|
||||
.await;
|
||||
|
||||
(!maps.is_empty()).then_some((room_id, maps))
|
||||
(!receipt_map.read.is_empty()).then_some((room_id, receipt_map))
|
||||
})
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
// the next transaction starts at the first receipt that did not fit
|
||||
max_edu_count
|
||||
.fetch_min(deferred.load(Ordering::Relaxed).saturating_sub(1), Ordering::Relaxed);
|
||||
|
||||
let mut contents = Vec::<BTreeMap<OwnedRoomId, ReceiptMap>>::new();
|
||||
for (room_id, maps) in rooms {
|
||||
for (index, read) in maps.into_iter().enumerate() {
|
||||
if index == contents.len() {
|
||||
contents.push(BTreeMap::new());
|
||||
}
|
||||
contents[index].insert(room_id.clone(), ReceiptMap::new(read));
|
||||
}
|
||||
if receipts.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
contents
|
||||
.into_iter()
|
||||
.map(|content| {
|
||||
let edu = Edu::Receipt(ReceiptContent::new(content));
|
||||
let receipt_content = Edu::Receipt(ReceiptContent::new(receipts));
|
||||
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &edu)
|
||||
.expect("Failed to serialize Receipt EDU to JSON vec");
|
||||
buf
|
||||
})
|
||||
.collect()
|
||||
let mut buf = EduBuf::new();
|
||||
serde_json::to_writer(&mut buf, &receipt_content)
|
||||
.expect("Failed to serialize Receipt EDU to JSON vec");
|
||||
|
||||
Some(buf)
|
||||
}
|
||||
|
||||
/// Look for read receipts in this room
|
||||
#[tracing::instrument(
|
||||
name = "receipts",
|
||||
level = "trace",
|
||||
skip(self, since, max_edu_count, num, deferred)
|
||||
skip(self, since, max_edu_count, num)
|
||||
)]
|
||||
async fn select_edus_receipts_room(
|
||||
&self,
|
||||
@@ -686,16 +661,14 @@ impl Service {
|
||||
since: (u64, u64),
|
||||
max_edu_count: &AtomicU64,
|
||||
num: &AtomicUsize,
|
||||
edu_limit: usize,
|
||||
deferred: &AtomicU64,
|
||||
) -> Vec<BTreeMap<OwnedUserId, ReceiptData>> {
|
||||
) -> ReceiptMap {
|
||||
let receipts = self
|
||||
.services
|
||||
.read_receipt
|
||||
.readreceipts_since(room_id, Some(since.0));
|
||||
|
||||
pin_mut!(receipts);
|
||||
let mut maps = Vec::new();
|
||||
let mut read = BTreeMap::<OwnedUserId, ReceiptData>::new();
|
||||
while let Some((user_id, count, read_receipt)) = receipts.next().await {
|
||||
if count > since.1 {
|
||||
break;
|
||||
@@ -731,20 +704,14 @@ impl Service {
|
||||
|
||||
let receipt_data = ReceiptData::new(receipt, vec![event_id]);
|
||||
|
||||
let Some(index) = add_receipt(&mut maps, user_id, receipt_data, edu_limit) else {
|
||||
deferred.fetch_min(count, Ordering::Relaxed);
|
||||
break;
|
||||
};
|
||||
|
||||
// only a user's first receipt counts towards the limit
|
||||
if index == 0
|
||||
&& num.fetch_add(1, Ordering::Relaxed).saturating_add(1) >= SELECT_RECEIPT_LIMIT
|
||||
{
|
||||
break;
|
||||
if read.insert(user_id, receipt_data).is_none() {
|
||||
if num.fetch_add(1, Ordering::Relaxed).saturating_add(1) >= SELECT_RECEIPT_LIMIT {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
maps
|
||||
ReceiptMap::new(read)
|
||||
}
|
||||
|
||||
/// Look for presence
|
||||
@@ -1143,27 +1110,3 @@ impl Service {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds the receipt to the first map without one from the user and returns
|
||||
/// that map's index, or `None` if all `limit` maps have one.
|
||||
fn add_receipt(
|
||||
maps: &mut Vec<BTreeMap<OwnedUserId, ReceiptData>>,
|
||||
user_id: OwnedUserId,
|
||||
receipt: ReceiptData,
|
||||
limit: usize,
|
||||
) -> Option<usize> {
|
||||
let index = maps
|
||||
.iter()
|
||||
.position(|map| !map.contains_key(&user_id))
|
||||
.unwrap_or(maps.len());
|
||||
if index >= limit {
|
||||
return None;
|
||||
}
|
||||
|
||||
if index == maps.len() {
|
||||
maps.push(BTreeMap::new());
|
||||
}
|
||||
maps[index].insert(user_id, receipt);
|
||||
|
||||
Some(index)
|
||||
}
|
||||
@@ -1,19 +1,14 @@
|
||||
use std::{collections::BTreeMap, iter::once};
|
||||
use std::iter::once;
|
||||
|
||||
use conduwuit::{
|
||||
Error,
|
||||
matrix::{PartialPdu, pdu::sticky},
|
||||
};
|
||||
use futures::{StreamExt, stream::FuturesUnordered};
|
||||
use ruma::{
|
||||
RoomId, UserId,
|
||||
api::federation::transactions::edu::ReceiptData,
|
||||
events::{receipt::Receipt, sticky::StickyDurationMs},
|
||||
server_name, user_id,
|
||||
};
|
||||
use ruma::{RoomId, UserId, events::sticky::StickyDurationMs, server_name};
|
||||
use serde_json::{json, value::to_raw_value};
|
||||
|
||||
use super::{CurTransactionStatus, TransactionStatus, add_receipt};
|
||||
use super::{CurTransactionStatus, TransactionStatus};
|
||||
use crate::{
|
||||
sending::{Destination, EduBuf, SendingEvent},
|
||||
test_utils::{test_services, test_services_with},
|
||||
@@ -201,17 +196,3 @@ async fn restarted_worker_keeps_sticky_events_when_startup_netburst_is_disabled(
|
||||
assert_eq!(active_after_startup, 0);
|
||||
assert_eq!(sending_after_startup, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_receipt_separates_receipts_of_one_user() {
|
||||
let alice = user_id!("@alice:example.org");
|
||||
let bob = user_id!("@bob:example.org");
|
||||
let receipt = || ReceiptData::new(Receipt::default(), vec![]);
|
||||
let mut maps = Vec::new();
|
||||
|
||||
assert_eq!(add_receipt(&mut maps, alice.to_owned(), receipt(), 2), Some(0));
|
||||
assert_eq!(add_receipt(&mut maps, alice.to_owned(), receipt(), 2), Some(1));
|
||||
assert_eq!(add_receipt(&mut maps, bob.to_owned(), receipt(), 2), Some(0));
|
||||
assert_eq!(add_receipt(&mut maps, alice.to_owned(), receipt(), 2), None);
|
||||
assert_eq!(maps.iter().map(BTreeMap::len).collect::<Vec<_>>(), [2, 1]);
|
||||
}
|
||||
Reference in new issue
Block a user