mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-05 06:41:46 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b09176163 | ||
|
|
aabdb5003c |
No files matched your search
@@ -69,7 +69,7 @@ jobs:
|
|||||||
CARGO_INCREMENTAL=${{ env.BUILDKIT_ENDPOINT != '' && '1' || '0' }}
|
CARGO_INCREMENTAL=${{ env.BUILDKIT_ENDPOINT != '' && '1' || '0' }}
|
||||||
TARGET_CPU=
|
TARGET_CPU=
|
||||||
RUST_PROFILE=release
|
RUST_PROFILE=release
|
||||||
CARGO_FEATURES=default,http3
|
CARGO_FEATURES=default
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.prepare.outputs.metadata_labels }}
|
labels: ${{ steps.prepare.outputs.metadata_labels }}
|
||||||
annotations: ${{ steps.prepare.outputs.metadata_annotations }}
|
annotations: ${{ steps.prepare.outputs.metadata_annotations }}
|
||||||
@@ -154,7 +154,7 @@ jobs:
|
|||||||
CARGO_INCREMENTAL=${{ env.BUILDKIT_ENDPOINT != '' && '1' || '0' }}
|
CARGO_INCREMENTAL=${{ env.BUILDKIT_ENDPOINT != '' && '1' || '0' }}
|
||||||
TARGET_CPU=${{ matrix.target_cpu }}
|
TARGET_CPU=${{ matrix.target_cpu }}
|
||||||
RUST_PROFILE=release-max-perf
|
RUST_PROFILE=release-max-perf
|
||||||
CARGO_FEATURES=default,http3,release_max_log_level
|
CARGO_FEATURES=default,release_max_log_level
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.prepare.outputs.metadata_labels }}
|
labels: ${{ steps.prepare.outputs.metadata_labels }}
|
||||||
annotations: ${{ steps.prepare.outputs.metadata_annotations }}
|
annotations: ${{ steps.prepare.outputs.metadata_annotations }}
|
||||||
|
|||||||
@@ -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 @@
|
|||||||
|
Errors while sending push notifications will now appear in the server log under more conditions, and will be registered as failures in Prometheus metrics.
|
||||||
Generated
+95
-132
@@ -16,38 +16,35 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@emnapi/core": {
|
"node_modules/@emnapi/core": {
|
||||||
"version": "1.11.3",
|
"version": "2.0.0-beta.3",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.3.tgz",
|
||||||
"integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",
|
"integrity": "sha512-KA+gOBtbifRATmUa/Gpf5C2B2EJ0r4brHUT3XSgACeHREcuiObXH56xd+B3fFsEFbUT04VBEe6MuZiCtMp0tQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emnapi/wasi-threads": "1.2.3",
|
"@emnapi/wasi-threads": "2.2.0",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@emnapi/runtime": {
|
"node_modules/@emnapi/runtime": {
|
||||||
"version": "1.11.3",
|
"version": "2.0.0-beta.3",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.3.tgz",
|
||||||
"integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
|
"integrity": "sha512-ayb/PyyLzpwRyFVxeC0uoEHu59QlB1iWGcGsOpXQcaB/Dc+uGfBmNmpCHp3HmTT0t8lSsMmg3j7+tdJW/TlHjQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@emnapi/wasi-threads": {
|
"node_modules/@emnapi/wasi-threads": {
|
||||||
"version": "1.2.3",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz",
|
||||||
"integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==",
|
"integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
@@ -131,13 +128,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rsbuild/core": {
|
"node_modules/@rsbuild/core": {
|
||||||
"version": "2.3.7",
|
"version": "2.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.6.tgz",
|
||||||
"integrity": "sha512-IvJZFEeVGcjeSiSHfMlRxJbyL5+xLGcvkNmD34wmIXo85n0va6b8cnqShmprdUKjvXyzE4dPPB9trRunaUY+mA==",
|
"integrity": "sha512-IVuWh/0DO6XT8075eCAzxWIcVGA7c4xKggf/VEePq3yXqEiU302n6OVGD7uCxQwPaB4R9ViX4cAqalcQV/sxKQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rspack/core": "~2.3.5",
|
"@rspack/core": "~2.3.4",
|
||||||
"@swc/helpers": "^0.5.24"
|
"@swc/helpers": "^0.5.24"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -175,32 +172,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding": {
|
"node_modules/@rspack/binding": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.4.tgz",
|
||||||
"integrity": "sha512-W3x7zw5d/mIH9WhWt4pO9RKYURoqgdUxeLSV5IhDCajnhXdRr7R59u5S2j5ZXzSk3eMGUC0PenfKIIdW7t0ufQ==",
|
"integrity": "sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rspack/binding-darwin-arm64": "2.3.5",
|
"@rspack/binding-darwin-arm64": "2.3.4",
|
||||||
"@rspack/binding-darwin-x64": "2.3.5",
|
"@rspack/binding-darwin-x64": "2.3.4",
|
||||||
"@rspack/binding-linux-arm64-gnu": "2.3.5",
|
"@rspack/binding-linux-arm64-gnu": "2.3.4",
|
||||||
"@rspack/binding-linux-arm64-musl": "2.3.5",
|
"@rspack/binding-linux-arm64-musl": "2.3.4",
|
||||||
"@rspack/binding-linux-ppc64-gnu": "2.3.5",
|
"@rspack/binding-linux-ppc64-gnu": "2.3.4",
|
||||||
"@rspack/binding-linux-riscv64-gnu": "2.3.5",
|
"@rspack/binding-linux-riscv64-gnu": "2.3.4",
|
||||||
"@rspack/binding-linux-riscv64-musl": "2.3.5",
|
"@rspack/binding-linux-riscv64-musl": "2.3.4",
|
||||||
"@rspack/binding-linux-s390x-gnu": "2.3.5",
|
"@rspack/binding-linux-s390x-gnu": "2.3.4",
|
||||||
"@rspack/binding-linux-x64-gnu": "2.3.5",
|
"@rspack/binding-linux-x64-gnu": "2.3.4",
|
||||||
"@rspack/binding-linux-x64-musl": "2.3.5",
|
"@rspack/binding-linux-x64-musl": "2.3.4",
|
||||||
"@rspack/binding-wasm32-wasi": "2.3.5",
|
"@rspack/binding-wasm32-wasi": "2.3.4",
|
||||||
"@rspack/binding-win32-arm64-msvc": "2.3.5",
|
"@rspack/binding-win32-arm64-msvc": "2.3.4",
|
||||||
"@rspack/binding-win32-ia32-msvc": "2.3.5",
|
"@rspack/binding-win32-ia32-msvc": "2.3.4",
|
||||||
"@rspack/binding-win32-x64-msvc": "2.3.5"
|
"@rspack/binding-win32-x64-msvc": "2.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-darwin-arm64": {
|
"node_modules/@rspack/binding-darwin-arm64": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.4.tgz",
|
||||||
"integrity": "sha512-A5XnBdSoJvcYV4t2Y+XJiCF0UZ42nOKE2D0ZlegfErGhzlQG1t3hDOzskSB2fPD3z+w5QeREoclqQ0zFOZyBpw==",
|
"integrity": "sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -212,9 +209,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-darwin-x64": {
|
"node_modules/@rspack/binding-darwin-x64": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.4.tgz",
|
||||||
"integrity": "sha512-iZrweqTIj2cM4f0ADRj6FXn9a0FOpD1Mx/++zrsbrQzmnY0c8wmfpvZ5xA5Zfcq9O6nuUBS6GnhkmoFTgviHwQ==",
|
"integrity": "sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -226,9 +223,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.4.tgz",
|
||||||
"integrity": "sha512-aWE9V0ZhmclKsJNuO37cxUMLtXMjhLtFzrWDWC82mksUX6qM2rzOpPuye9i/c9NGqyrIH7EFQre8bskJvNHGuQ==",
|
"integrity": "sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -243,9 +240,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.4.tgz",
|
||||||
"integrity": "sha512-I8ENTXdv7Th/OHEYhL7uu3B7DA9r1oTWSifkGHJtuT1XJ0KDsxoA6ORpYz1R2qIs87l+8+5QUnRH7iWyZrnroA==",
|
"integrity": "sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -260,9 +257,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-ppc64-gnu": {
|
"node_modules/@rspack/binding-linux-ppc64-gnu": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.4.tgz",
|
||||||
"integrity": "sha512-ps5do0cKf4aTBWd+LHqvwm8Gdn7J/gvzmx9pWJhAIThvzii45wJREFjGOzJNxdQl+pzKq8JFuzbShNskCN9k2w==",
|
"integrity": "sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -277,9 +274,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-riscv64-gnu": {
|
"node_modules/@rspack/binding-linux-riscv64-gnu": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.4.tgz",
|
||||||
"integrity": "sha512-3XXIEMS4SSr1/9wIAGgPT1oj1SzhnlejAG5xeVbGJR5y6iFp/oFKYzUPqyuuzZCkWph2/hJ+Q16sa+BJn1YIkg==",
|
"integrity": "sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -294,9 +291,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-riscv64-musl": {
|
"node_modules/@rspack/binding-linux-riscv64-musl": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.4.tgz",
|
||||||
"integrity": "sha512-z2DbQNcLbUEY9OvUa3gahsHey+dW4acLc9d3QlyJm7TJE//rL9C/XBk4kETvCgtdhqrwBSfWrZfislBPKODjvA==",
|
"integrity": "sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -311,9 +308,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-s390x-gnu": {
|
"node_modules/@rspack/binding-linux-s390x-gnu": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.4.tgz",
|
||||||
"integrity": "sha512-n2UudDpzt9G2AOmycVS7uWRMcNMd2k4ubU4b4SX3FfU/uT6mfSNzuwhBhCi0RSZQAGBU0ombJ+sqw8vKXjGGbw==",
|
"integrity": "sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -328,9 +325,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.4.tgz",
|
||||||
"integrity": "sha512-1sxASGJXg9luaYsFSmAQxSFbUbnMnPA5Mr94yIlLsq4q94sHUIn5YjG1XGcT+cPhUYF9fHkCsKRmQlzrN9fR8A==",
|
"integrity": "sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -345,9 +342,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.4.tgz",
|
||||||
"integrity": "sha512-/S4pe1wAo8CBTs0X8DNKu1ZOJ2vQcnThLBKS2CxOPiuQXI7UfAsJCEABBoa8yCrZANWh63fJ90UwLb/s245Gsw==",
|
"integrity": "sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -362,9 +359,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-wasm32-wasi": {
|
"node_modules/@rspack/binding-wasm32-wasi": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.4.tgz",
|
||||||
"integrity": "sha512-GQnswrv6AyBdDCcTy8dTVhD0JqnvmgewzPz6qnOYWGKxpCY99Bv6FL4jvxI1yh64Uk3ykEfbwhrPnaA8Px4KJA==",
|
"integrity": "sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"wasm32"
|
"wasm32"
|
||||||
],
|
],
|
||||||
@@ -372,49 +369,15 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emnapi/core": "2.0.0-beta.4",
|
"@emnapi/core": "2.0.0-beta.3",
|
||||||
"@emnapi/runtime": "2.0.0-beta.4",
|
"@emnapi/runtime": "2.0.0-beta.3",
|
||||||
"@napi-rs/wasm-runtime": "1.2.7"
|
"@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": {
|
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.4.tgz",
|
||||||
"integrity": "sha512-XVKu3Zs5KGr+P5Seh6NtSNU0UQ1GSgSDFANQRZlT1uFZ1NpBCX+9NB8FVZB0hBBoBKI1kU4b0Cr6Df1Xx0K4nQ==",
|
"integrity": "sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -426,9 +389,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.4.tgz",
|
||||||
"integrity": "sha512-ejCqSuctPcOev2dyi0ayZyfIUY3fJdYHYvrTfSVrrGC19TspuRATXu+RLyu3xvB6TrQF3+JEF4KeG4/ZeWuXOg==",
|
"integrity": "sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -440,9 +403,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.4.tgz",
|
||||||
"integrity": "sha512-IPvkjM3xAwL1z2N4Jp/GBcZUme703uDy5vrP1IMtXJEl/EOLLfwl7cRb4sSzdeOYGDDHs5dPYDcpgP5eRSRauA==",
|
"integrity": "sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -454,13 +417,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/core": {
|
"node_modules/@rspack/core": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.4.tgz",
|
||||||
"integrity": "sha512-4TG6zGTemEU/FU7bymDgeFOO7CRdd7ucn0CmXo+3cG6EhYmY5+hpAFYBRgxDbDuL4Bwo/s5GsgUvZuI7rLqVbQ==",
|
"integrity": "sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rspack/binding": "2.3.5"
|
"@rspack/binding": "2.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
@@ -495,22 +458,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/core": {
|
"node_modules/@rspress/core": {
|
||||||
"version": "2.1.6",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.1.5.tgz",
|
||||||
"integrity": "sha512-a+CBJcslana9Zmr6j2o3RP6O19y+rcyfa8jeDToC1b29e/RGiD+xpAQJF2eBvnjNUHouXARTaFa7pE1myyV0Rg==",
|
"integrity": "sha512-kzTqrfJ4UiW+RLLHLunoW/rET5Vjb6Qz4YjhEhiWEp4HYM+KxLVhfyYB5aL8af9+mdnwiTaqlu1s+BZGrMD2zw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/mdx": "^3.1.1",
|
"@mdx-js/mdx": "^3.1.1",
|
||||||
"@mdx-js/react": "^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",
|
"@rsbuild/plugin-react": "~2.1.1",
|
||||||
"@rspress/shared": "2.1.6",
|
"@rspress/shared": "2.1.5",
|
||||||
"@shikijs/rehype": "^4.2.0",
|
"@shikijs/rehype": "^4.2.0",
|
||||||
"@shikijs/transformers": "^4.2.0",
|
"@shikijs/transformers": "^4.2.0",
|
||||||
"@types/mdast": "^4.0.4",
|
"@types/mdast": "^4.0.4",
|
||||||
"@types/react": "^19.3.3",
|
"@types/react": "^19.3.0",
|
||||||
"@unhead/react": "^2.1.19",
|
"@unhead/react": "^2.1.18",
|
||||||
"body-scroll-lock": "4.0.0-beta.0",
|
"body-scroll-lock": "4.0.0-beta.0",
|
||||||
"clsx": "2.1.1",
|
"clsx": "2.1.1",
|
||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
@@ -527,7 +490,7 @@
|
|||||||
"react-dom": "^19.3.1",
|
"react-dom": "^19.3.1",
|
||||||
"react-lazy-with-preload": "^2.2.1",
|
"react-lazy-with-preload": "^2.2.1",
|
||||||
"react-render-to-markdown": "19.2.0",
|
"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-external-links": "^3.0.0",
|
||||||
"rehype-raw": "^7.0.0",
|
"rehype-raw": "^7.0.0",
|
||||||
"remark-cjk-friendly": "^2.3.4",
|
"remark-cjk-friendly": "^2.3.4",
|
||||||
@@ -551,9 +514,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/plugin-client-redirects": {
|
"node_modules/@rspress/plugin-client-redirects": {
|
||||||
"version": "2.1.6",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.1.5.tgz",
|
||||||
"integrity": "sha512-lnSIA3oD44PZa0o0r4gvTBBGWeImD3T7D28FRJlzCdrWQX3kOHpyhxd9fCcK9mE32DYItlu/ipsmpSozmDN9ZA==",
|
"integrity": "sha512-vqAi7ynOgVsuwJi7cXwWEF5UgoNhXqGOyBfQubeZHZKWRtdNHRU42P9rG9DZLTss2dZUiDKlVrM2/vNY40t5hw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -564,15 +527,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/shared": {
|
"node_modules/@rspress/shared": {
|
||||||
"version": "2.1.6",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.1.5.tgz",
|
||||||
"integrity": "sha512-ecHmNItlMsMU5FEf0CeBKZa4XNCE5fpwCED+1/lmcwIhozyBvd4j4Ook/8IyTT3UqgruJDZ2DwQqfyvCW7zmLg==",
|
"integrity": "sha512-XXxegxRZ7VPADS2veN9FTNmmLlA65ieydKH0tOhOZbMJC4OJpKbr/d/JS2jxxAO4u+ZmZxbDyEEir83NQHLKIw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rsbuild/core": "^2.3.7",
|
"@rsbuild/core": "^2.3.3",
|
||||||
"@shikijs/rehype": "^4.2.0",
|
"@shikijs/rehype": "^4.2.0",
|
||||||
"@types/react": "^19.3.3",
|
"@types/react": "^19.3.0",
|
||||||
"mdast-util-mdx-jsx": "^3.2.2",
|
"mdast-util-mdx-jsx": "^3.2.2",
|
||||||
"unified": "^11.0.5"
|
"unified": "^11.0.5"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ assets = [
|
|||||||
default = [
|
default = [
|
||||||
"standard",
|
"standard",
|
||||||
"jemalloc",
|
"jemalloc",
|
||||||
"aws_lc_rs",
|
"ring",
|
||||||
"bindgen-runtime", # replace with bindgen-static on alpine
|
"bindgen-runtime", # replace with bindgen-static on alpine
|
||||||
]
|
]
|
||||||
standard = [
|
standard = [
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ pub fn run_with_args(args: &Args) -> Result<()> {
|
|||||||
#[cfg(feature = "aws_lc_rs")]
|
#[cfg(feature = "aws_lc_rs")]
|
||||||
rustls::crypto::aws_lc_rs::default_provider()
|
rustls::crypto::aws_lc_rs::default_provider()
|
||||||
.install_default()
|
.install_default()
|
||||||
.expect("failed to initialise aws_lc_rs rustls crypto provider");
|
.expect("failed to initialise ring rustls crypto provider");
|
||||||
|
|
||||||
#[cfg(all(feature = "ring", not(feature = "aws_lc_rs")))]
|
#[cfg(all(feature = "ring", not(feature = "aws_lc_rs")))]
|
||||||
rustls::crypto::ring::default_provider()
|
rustls::crypto::ring::default_provider()
|
||||||
|
|||||||
@@ -149,4 +149,4 @@ ignored = ["reqwest_0_12"]
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
opentelemetry.workspace = true
|
opentelemetry.workspace = true
|
||||||
rustls = { workspace = true, features = ["aws_lc_rs"] }
|
rustls = { workspace = true, features = ["ring"] }
|
||||||
@@ -522,6 +522,13 @@ impl Service {
|
|||||||
let device_changes =
|
let device_changes =
|
||||||
self.select_edus_device_changes(server_name, batch, &max_edu_count, &events_len);
|
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
|
let presence: OptionFuture<_> = self
|
||||||
.server
|
.server
|
||||||
.config
|
.config
|
||||||
@@ -529,20 +536,11 @@ impl Service {
|
|||||||
.then(|| self.select_edus_presence(server_name, batch, &max_edu_count))
|
.then(|| self.select_edus_presence(server_name, batch, &max_edu_count))
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let (device_changes, presence) = join!(device_changes, presence);
|
let (device_changes, receipts, presence) = join!(device_changes, receipts, presence);
|
||||||
|
|
||||||
let mut events = device_changes;
|
let mut events = device_changes;
|
||||||
events.extend(presence.into_iter().flatten());
|
events.extend(presence.into_iter().flatten());
|
||||||
|
events.extend(receipts.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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(nex): some EDUs like typing need flattening
|
// TODO(nex): some EDUs like typing need flattening
|
||||||
|
|
||||||
@@ -618,11 +616,9 @@ impl Service {
|
|||||||
server_name: &ServerName,
|
server_name: &ServerName,
|
||||||
since: (u64, u64),
|
since: (u64, u64),
|
||||||
max_edu_count: &AtomicU64,
|
max_edu_count: &AtomicU64,
|
||||||
edu_limit: usize,
|
) -> Option<EduBuf> {
|
||||||
) -> EduVec {
|
|
||||||
let num = AtomicUsize::new(0);
|
let num = AtomicUsize::new(0);
|
||||||
let deferred = AtomicU64::new(u64::MAX);
|
let receipts: BTreeMap<OwnedRoomId, ReceiptMap> = self
|
||||||
let rooms: Vec<_> = self
|
|
||||||
.services
|
.services
|
||||||
.state_cache
|
.state_cache
|
||||||
.server_rooms(server_name)
|
.server_rooms(server_name)
|
||||||
@@ -631,54 +627,33 @@ impl Service {
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
let maps = self
|
let receipt_map = self
|
||||||
.select_edus_receipts_room(
|
.select_edus_receipts_room(&room_id, since, max_edu_count, &num)
|
||||||
&room_id,
|
|
||||||
since,
|
|
||||||
max_edu_count,
|
|
||||||
&num,
|
|
||||||
edu_limit,
|
|
||||||
&deferred,
|
|
||||||
)
|
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
(!maps.is_empty()).then_some((room_id, maps))
|
(!receipt_map.read.is_empty()).then_some((room_id, receipt_map))
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
// the next transaction starts at the first receipt that did not fit
|
if receipts.is_empty() {
|
||||||
max_edu_count
|
return None;
|
||||||
.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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contents
|
let receipt_content = Edu::Receipt(ReceiptContent::new(receipts));
|
||||||
.into_iter()
|
|
||||||
.map(|content| {
|
|
||||||
let edu = Edu::Receipt(ReceiptContent::new(content));
|
|
||||||
|
|
||||||
let mut buf = EduBuf::new();
|
let mut buf = EduBuf::new();
|
||||||
serde_json::to_writer(&mut buf, &edu)
|
serde_json::to_writer(&mut buf, &receipt_content)
|
||||||
.expect("Failed to serialize Receipt EDU to JSON vec");
|
.expect("Failed to serialize Receipt EDU to JSON vec");
|
||||||
buf
|
|
||||||
})
|
Some(buf)
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Look for read receipts in this room
|
/// Look for read receipts in this room
|
||||||
#[tracing::instrument(
|
#[tracing::instrument(
|
||||||
name = "receipts",
|
name = "receipts",
|
||||||
level = "trace",
|
level = "trace",
|
||||||
skip(self, since, max_edu_count, num, deferred)
|
skip(self, since, max_edu_count, num)
|
||||||
)]
|
)]
|
||||||
async fn select_edus_receipts_room(
|
async fn select_edus_receipts_room(
|
||||||
&self,
|
&self,
|
||||||
@@ -686,16 +661,14 @@ impl Service {
|
|||||||
since: (u64, u64),
|
since: (u64, u64),
|
||||||
max_edu_count: &AtomicU64,
|
max_edu_count: &AtomicU64,
|
||||||
num: &AtomicUsize,
|
num: &AtomicUsize,
|
||||||
edu_limit: usize,
|
) -> ReceiptMap {
|
||||||
deferred: &AtomicU64,
|
|
||||||
) -> Vec<BTreeMap<OwnedUserId, ReceiptData>> {
|
|
||||||
let receipts = self
|
let receipts = self
|
||||||
.services
|
.services
|
||||||
.read_receipt
|
.read_receipt
|
||||||
.readreceipts_since(room_id, Some(since.0));
|
.readreceipts_since(room_id, Some(since.0));
|
||||||
|
|
||||||
pin_mut!(receipts);
|
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 {
|
while let Some((user_id, count, read_receipt)) = receipts.next().await {
|
||||||
if count > since.1 {
|
if count > since.1 {
|
||||||
break;
|
break;
|
||||||
@@ -731,20 +704,14 @@ impl Service {
|
|||||||
|
|
||||||
let receipt_data = ReceiptData::new(receipt, vec![event_id]);
|
let receipt_data = ReceiptData::new(receipt, vec![event_id]);
|
||||||
|
|
||||||
let Some(index) = add_receipt(&mut maps, user_id, receipt_data, edu_limit) else {
|
if read.insert(user_id, receipt_data).is_none() {
|
||||||
deferred.fetch_min(count, Ordering::Relaxed);
|
if num.fetch_add(1, Ordering::Relaxed).saturating_add(1) >= SELECT_RECEIPT_LIMIT {
|
||||||
break;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maps
|
ReceiptMap::new(read)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Look for presence
|
/// Look for presence
|
||||||
@@ -1003,6 +970,8 @@ impl Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut first_push_error = None;
|
||||||
|
|
||||||
for pdu in pdus {
|
for pdu in pdus {
|
||||||
// Redacted events are not notification targets (we don't send push
|
// Redacted events are not notification targets (we don't send push
|
||||||
// for them)
|
// for them)
|
||||||
@@ -1028,15 +997,27 @@ impl Service {
|
|||||||
.try_into()
|
.try_into()
|
||||||
.expect("notification count can't go that high");
|
.expect("notification count can't go that high");
|
||||||
|
|
||||||
let _response = self
|
let response = self
|
||||||
.services
|
.services
|
||||||
.pusher
|
.pusher
|
||||||
.send_push_notice(&user_id, unread, &pusher, rules_for_user, &pdu)
|
.send_push_notice(&user_id, unread, &pusher, rules_for_user, &pdu)
|
||||||
.await
|
.await
|
||||||
.map_err(|e| (Destination::Push(user_id.clone(), pushkey.clone()), e));
|
.map_err(|e| (Destination::Push(user_id.clone(), pushkey.clone()), Box::new(e)));
|
||||||
|
|
||||||
|
if let Err(err) = response {
|
||||||
|
error!(event = %pdu.event_id, pusher = %pusher.app_display_name, "Failed to deliver push notification: {err:?}");
|
||||||
|
|
||||||
|
if first_push_error.is_none() {
|
||||||
|
first_push_error = Some(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Destination::Push(user_id, pushkey))
|
if let Some(err) = first_push_error {
|
||||||
|
Err(err)
|
||||||
|
} else {
|
||||||
|
Ok(Destination::Push(user_id, pushkey))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn send_events_dest_federation(
|
async fn send_events_dest_federation(
|
||||||
@@ -1143,27 +1124,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::{
|
use conduwuit::{
|
||||||
Error,
|
Error,
|
||||||
matrix::{PartialPdu, pdu::sticky},
|
matrix::{PartialPdu, pdu::sticky},
|
||||||
};
|
};
|
||||||
use futures::{StreamExt, stream::FuturesUnordered};
|
use futures::{StreamExt, stream::FuturesUnordered};
|
||||||
use ruma::{
|
use ruma::{RoomId, UserId, events::sticky::StickyDurationMs, server_name};
|
||||||
RoomId, UserId,
|
|
||||||
api::federation::transactions::edu::ReceiptData,
|
|
||||||
events::{receipt::Receipt, sticky::StickyDurationMs},
|
|
||||||
server_name, user_id,
|
|
||||||
};
|
|
||||||
use serde_json::{json, value::to_raw_value};
|
use serde_json::{json, value::to_raw_value};
|
||||||
|
|
||||||
use super::{CurTransactionStatus, TransactionStatus, add_receipt};
|
use super::{CurTransactionStatus, TransactionStatus};
|
||||||
use crate::{
|
use crate::{
|
||||||
sending::{Destination, EduBuf, SendingEvent},
|
sending::{Destination, EduBuf, SendingEvent},
|
||||||
test_utils::{test_services, test_services_with},
|
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!(active_after_startup, 0);
|
||||||
assert_eq!(sending_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]);
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@ pub(crate) async fn test_services() -> TestServices { test_services_with(json!({
|
|||||||
|
|
||||||
pub(crate) async fn test_services_with(overrides: serde_json::Value) -> TestServices {
|
pub(crate) async fn test_services_with(overrides: serde_json::Value) -> TestServices {
|
||||||
let guard = DATABASE.lock().await;
|
let guard = DATABASE.lock().await;
|
||||||
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
|
let _ = rustls::crypto::ring::default_provider().install_default();
|
||||||
let path = std::env::temp_dir()
|
let path = std::env::temp_dir()
|
||||||
.join(format!("continuwuity-shared-state-{:016x}", rand::random::<u64>()));
|
.join(format!("continuwuity-shared-state-{:016x}", rand::random::<u64>()));
|
||||||
std::fs::create_dir(&path).unwrap();
|
std::fs::create_dir(&path).unwrap();
|
||||||
|
|||||||
Reference in new issue
Block a user