mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-21 16:07:35 +00:00
Compare commits
225
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc6aec62ec | ||
|
|
a973f3e10c | ||
|
|
ab939da036 | ||
|
|
138dd61f82 | ||
|
|
98c694eaa3 | ||
|
|
e6ca06a501 | ||
|
|
4f21fa2bda | ||
|
|
08301fba2a | ||
|
|
a21b0918dc | ||
|
|
a17a805293 | ||
|
|
090203c2ea | ||
|
|
ff63d9f203 | ||
|
|
511e791b9f | ||
|
|
bc70c4eaff | ||
|
|
bbbc9bc7d8 | ||
|
|
7da0ef6e2b | ||
|
|
24e289113b | ||
|
|
805d4d9416 | ||
|
|
fe0ab62124 | ||
|
|
bd005edd59 | ||
|
|
c66fb684f0 | ||
|
|
0773cd1f78 | ||
|
|
929ef60780 | ||
|
|
39bb4fefa1 | ||
|
|
b4a2a457a1 | ||
|
|
dac940784d | ||
|
|
8200487787 | ||
|
|
b5c3da3f52 | ||
|
|
3975d31b91 | ||
|
|
fd4cb4a306 | ||
|
|
c79e9e29a3 | ||
|
|
698edda6bd | ||
|
|
ea3ec965ed | ||
|
|
9d454fd883 | ||
|
|
4996471878 | ||
|
|
5185045cb6 | ||
|
|
e96b6e6665 | ||
|
|
e584e1a572 | ||
|
|
31bce80524 | ||
|
|
f14c401f39 | ||
|
|
ea96858c4a | ||
|
|
75c439a9d0 | ||
|
|
d3b9aee3ab | ||
|
|
3af5302dd8 | ||
|
|
0415a35fa8 | ||
|
|
b76dc816a4 | ||
|
|
536d96abb4 | ||
|
|
2fad908f27 | ||
|
|
b081ac36ff | ||
|
|
c3ba97adb6 | ||
|
|
30508ea353 | ||
|
|
df3466e68d | ||
|
|
5d55b413a2 | ||
|
|
7ce47be4de | ||
|
|
7cedf9f322 | ||
|
|
17f5ce10f4 | ||
|
|
5f13bab52f | ||
|
|
c1e4f926c8 | ||
|
|
63578eba8c | ||
|
|
20fe43d200 | ||
|
|
1ffb1d637e | ||
|
|
0224a558b3 | ||
|
|
ae2e71ff45 | ||
|
|
52435fa02d | ||
|
|
c0d8f5ab8b | ||
|
|
80851bba06 | ||
|
|
4d7341c32d | ||
|
|
18f2118c42 | ||
|
|
240c806d70 | ||
|
|
2fdd59ae54 | ||
|
|
a8a6ab9e3d | ||
|
|
f55a5bd1c3 | ||
|
|
7ab415c4b6 | ||
|
|
c9b0fbaeac | ||
|
|
bc9b97e97f | ||
|
|
0d48c9681d | ||
|
|
38f8011b95 | ||
|
|
e963adf524 | ||
|
|
af84202ba4 | ||
|
|
08b6ab4af7 | ||
|
|
823ee9f6e1 | ||
|
|
3a20ad7ff2 | ||
|
|
4d4693494b | ||
|
|
1e34bd2ed9 | ||
|
|
d83da6ada7 | ||
|
|
9377ff7abd | ||
|
|
2118eb8501 | ||
|
|
ef0483feb9 | ||
|
|
25f59e3e2c | ||
|
|
060eee983d | ||
|
|
7fba194bff | ||
|
|
7bf6f3bd11 | ||
|
|
8b77a559e0 | ||
|
|
c1d75183d1 | ||
|
|
f9a6171cc5 | ||
|
|
5fcc43e803 | ||
|
|
26646f9df6 | ||
|
|
c221d60654 | ||
|
|
70cce17b7f | ||
|
|
2f45a5c794 | ||
|
|
b64f8a76ac | ||
|
|
aab456e0e0 | ||
|
|
b40204a6c7 | ||
|
|
ea16e78092 | ||
|
|
56c2d8d901 | ||
|
|
7d8a5f6bab | ||
|
|
de578c2163 | ||
|
|
c94fa39fd1 | ||
|
|
2773ff3e16 | ||
|
|
6bbea25034 | ||
|
|
39bee607c0 | ||
|
|
935ddf1d0f | ||
|
|
495eeedd24 | ||
|
|
63294f8775 | ||
|
|
7243c92dbc | ||
|
|
43ee11bb00 | ||
|
|
f1d9537b14 | ||
|
|
cb7af18bc2 | ||
|
|
a6fae7498d | ||
|
|
48c36d6f17 | ||
|
|
23d07e3d4f | ||
|
|
1220144495 | ||
|
|
a718aa92eb | ||
|
|
4a97dc8c96 | ||
|
|
8414af2349 | ||
|
|
4daf674337 | ||
|
|
847412367b | ||
|
|
95e99a393d | ||
|
|
a4faa82f38 | ||
|
|
e931fdca15 | ||
|
|
db6e70eae8 | ||
|
|
d97fcc9acd | ||
|
|
c087c3cdb8 | ||
|
|
c186879138 | ||
|
|
92bc1111ee | ||
|
|
0989155929 | ||
|
|
15bb2f7bf5 | ||
|
|
a62f7ecc28 | ||
|
|
30266fe3b5 | ||
|
|
7d1163e35d | ||
|
|
a88da6fd5c | ||
|
|
d413a3ebdc | ||
|
|
4dd538219a | ||
|
|
413ebc0061 | ||
|
|
2eda5de86b | ||
|
|
931686e84e | ||
|
|
eb602e83a1 | ||
|
|
5c4066cbfd | ||
|
|
58d135bc57 | ||
|
|
684820c7c1 | ||
|
|
cbdf978b84 | ||
|
|
38b7987335 | ||
|
|
612a261b61 | ||
|
|
b1e51ab0fb | ||
|
|
8f56f99e2f | ||
|
|
95f65fdba4 | ||
|
|
23a0fc1b0f | ||
|
|
f49bda81d2 | ||
|
|
f35eb7677c | ||
|
|
b2a90f118d | ||
|
|
4b79acba97 | ||
|
|
01a83067c6 | ||
|
|
84cf4196e2 | ||
|
|
83341062af | ||
|
|
1d196f24ec | ||
|
|
4631854325 | ||
|
|
26b8e527aa | ||
|
|
c07922fff2 | ||
|
|
e41435f13c | ||
|
|
8c0fcfd108 | ||
|
|
516f94d83f | ||
|
|
97533eea05 | ||
|
|
062cb5b412 | ||
|
|
17084a363b | ||
|
|
ac96b57506 | ||
|
|
385f6639c4 | ||
|
|
b3a15fc305 | ||
|
|
979c1b2fc7 | ||
|
|
8f2f7f09ed | ||
|
|
b59e697ed6 | ||
|
|
9c0b88f67c | ||
|
|
76e87c93d8 | ||
|
|
aa40142b87 | ||
|
|
046074bbc2 | ||
|
|
550dd0160a | ||
|
|
c0ad864d57 | ||
|
|
451c44800b | ||
|
|
a61026912c | ||
|
|
05d6922351 | ||
|
|
f0a0596d12 | ||
|
|
fbedf994db | ||
|
|
1de16fed9e | ||
|
|
4812837d13 | ||
|
|
90793eaaf4 | ||
|
|
744928b206 | ||
|
|
05ee24df7d | ||
|
|
89eecd2bf7 | ||
|
|
b2072baf59 | ||
|
|
286897de88 | ||
|
|
3ee4ab7c09 | ||
|
|
173091624c | ||
|
|
0f21f42787 | ||
|
|
31a0c4c9b5 | ||
|
|
8d60b8dada | ||
|
|
84222bfc7b | ||
|
|
a4d2d4a720 | ||
|
|
02d245afe5 | ||
|
|
3e5ea8f850 | ||
|
|
5878594698 | ||
|
|
4e8643147d | ||
|
|
4ea4e15edb | ||
|
|
cee69b4c8d | ||
|
|
457b884491 | ||
|
|
d3ed175264 | ||
|
|
7924e96589 | ||
|
|
d1b1274900 | ||
|
|
6299df3552 | ||
|
|
20d146bd5e | ||
|
|
03f60c7002 | ||
|
|
ed1e634579 | ||
|
|
dbcffe8af0 | ||
|
|
8891adfba3 | ||
|
|
4c8dc59f7a | ||
|
|
1a8e5ccc09 | ||
|
|
c8720a6ebc |
No files matched your search
@@ -52,7 +52,7 @@ runs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
|
||||
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
with:
|
||||
# Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125)
|
||||
driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }}
|
||||
|
||||
@@ -67,7 +67,7 @@ runs:
|
||||
uses: ./.forgejo/actions/rust-toolchain
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
with:
|
||||
# Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125)
|
||||
driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }}
|
||||
@@ -75,7 +75,7 @@ runs:
|
||||
|
||||
- name: Set up QEMU
|
||||
if: ${{ env.BUILDKIT_ENDPOINT == '' }}
|
||||
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4
|
||||
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
|
||||
|
||||
- name: Login to builtin registry
|
||||
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
|
||||
|
||||
@@ -71,7 +71,7 @@ runs:
|
||||
|
||||
- name: Install timelord-cli and git-warp-time
|
||||
if: steps.check-binaries.outputs.need-install == 'true'
|
||||
uses: https://github.com/taiki-e/install-action@3f74d7c16a4242f1c95561e98edc25d36adb4375 # v2
|
||||
uses: https://github.com/taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2
|
||||
with:
|
||||
tool: git-warp-time,timelord-cli@3.0.1
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ creds:
|
||||
- registry: forgejo.ellis.link
|
||||
user: "{{env \"BUILTIN_REGISTRY_USER\"}}"
|
||||
pass: "{{env \"BUILTIN_REGISTRY_PASSWORD\"}}"
|
||||
- registry: registry.gitlab.com
|
||||
user: "{{env \"GITLAB_USERNAME\"}}"
|
||||
pass: "{{env \"GITLAB_TOKEN\"}}"
|
||||
# - registry: registry.gitlab.com
|
||||
# user: "{{env \"GITLAB_USERNAME\"}}"
|
||||
# pass: "{{env \"GITLAB_TOKEN\"}}"
|
||||
- registry: git.nexy7574.co.uk
|
||||
user: "{{env \"N7574_GIT_USERNAME\"}}"
|
||||
pass: "{{env \"N7574_GIT_TOKEN\"}}"
|
||||
@@ -58,10 +58,10 @@ defaults:
|
||||
|
||||
# Sync configuration - each registry gets different image sets
|
||||
sync:
|
||||
- source: *source
|
||||
target: registry.gitlab.com/continuwuity/continuwuity
|
||||
type: repository
|
||||
<<: *tags-main
|
||||
#- source: *source
|
||||
# target: registry.gitlab.com/continuwuity/continuwuity
|
||||
# type: repository
|
||||
# <<: *tags-main
|
||||
- source: *source
|
||||
target: ghcr.io/continuwuity/continuwuity
|
||||
type: repository
|
||||
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
COMPONENT="dev-$(echo '${{ forge.ref_name }}' | sed 's/[^a-zA-Z0-9.+]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)"
|
||||
fi
|
||||
CLEAN_COMPONENT=$(echo $COMPONENT | sed 's/[^a-zA-Z0-9.+]/~/g')
|
||||
VERSION="$BASE_VERSION~git$DATE.$SHA-$CLEAN_COMPONENT"
|
||||
VERSION="$BASE_VERSION-git$DATE.$SHA-$CLEAN_COMPONENT"
|
||||
fi
|
||||
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -32,9 +32,9 @@ jobs:
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20'
|
||||
uses: https://github.com/actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
||||
uses: https://github.com/actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
|
||||
- name: Cache npm dependencies
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: Deploy to Cloudflare Pages (Production)
|
||||
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != ''
|
||||
uses: https://github.com/cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4
|
||||
uses: https://github.com/cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4
|
||||
with:
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- name: Deploy to Cloudflare Pages (Preview)
|
||||
if: github.ref != 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != ''
|
||||
uses: https://github.com/cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4
|
||||
uses: https://github.com/cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4
|
||||
with:
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
# repositories: continuwuity
|
||||
|
||||
- name: Install regsync
|
||||
uses: https://github.com/regclient/actions/regsync-installer@bb562fac724b7b37c17f19671df07fe34fabc376 # main
|
||||
uses: https://github.com/regclient/actions/regsync-installer@dd58ad94f76adb73d8ac1bf75ed25f01545d5b32 # main
|
||||
|
||||
- name: Check what images need mirroring
|
||||
run: |
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push Docker image by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
|
||||
with:
|
||||
context: .
|
||||
file: "docker/Dockerfile"
|
||||
@@ -150,7 +150,7 @@ jobs:
|
||||
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push max-perf Docker image by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
|
||||
with:
|
||||
context: .
|
||||
file: "docker/Dockerfile"
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
name: Renovate
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/renovatebot/renovate:44.83.2@sha256:7c83dd134ede3fd12ffbdaa67e426aafebd592f4ffdff8fdbae92d48f98324af
|
||||
image: ghcr.io/renovatebot/renovate:44.151.2@sha256:29b3bf193f855c6f4b7027395a9c66c3417ad8bb6f30458090e1c2363d04eef7
|
||||
options: --tmpfs /tmp:exec
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
+18
-30
@@ -10,31 +10,31 @@ repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
- id: fix-byte-order-marker
|
||||
- id: check-case-conflict
|
||||
- id: check-symlinks
|
||||
- id: destroyed-symlinks
|
||||
- id: check-yaml
|
||||
- id: check-json
|
||||
- id: check-toml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
- id: check-merge-conflict
|
||||
- id: check-added-large-files
|
||||
- id: fix-byte-order-marker
|
||||
- id: check-case-conflict
|
||||
- id: check-symlinks
|
||||
- id: destroyed-symlinks
|
||||
- id: check-yaml
|
||||
- id: check-json
|
||||
- id: check-toml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
- id: check-merge-conflict
|
||||
- id: check-added-large-files
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.50.2
|
||||
rev: v1.51.1
|
||||
hooks:
|
||||
- id: typos
|
||||
- id: typos
|
||||
name: commit-msg-typos
|
||||
stages: [commit-msg]
|
||||
stages: [ commit-msg ]
|
||||
|
||||
- repo: https://github.com/crate-ci/committed
|
||||
rev: v1.1.11
|
||||
hooks:
|
||||
- id: committed
|
||||
- id: committed
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
@@ -42,10 +42,10 @@ repos:
|
||||
name: cargo fmt
|
||||
entry: cargo +nightly fmt --
|
||||
language: system
|
||||
types: [rust]
|
||||
types: [ rust ]
|
||||
pass_filenames: false
|
||||
stages:
|
||||
- pre-commit
|
||||
- pre-commit
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
@@ -54,18 +54,6 @@ repos:
|
||||
entry: cargo clippy -- -D warnings
|
||||
language: system
|
||||
pass_filenames: false
|
||||
types: [rust]
|
||||
types: [ rust ]
|
||||
stages:
|
||||
- pre-push
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: docs-build
|
||||
name: docs build
|
||||
entry: npm run docs:build
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: docs/
|
||||
types: [mdx]
|
||||
stages:
|
||||
- pre-commit
|
||||
@@ -1,3 +1,21 @@
|
||||
# Continuwuity v26.9.1 (2026-09-28)
|
||||
|
||||
## Features
|
||||
|
||||
- The server now calculates some data for `unsigned` data when sending it to clients, rather than embedding it at rest. This brings decreased storage costs and improved access control checks.
|
||||
Contributed by @nex. ([#2270](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2270))
|
||||
- Added encrypted Web Push ([MSC4174](https://github.com/matrix-org/matrix-spec-proposals/pull/4174)), enabled by default. Contributed by @eleboucher.
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- Fixed exponential blowup in auth event fetching for deep auth chains, which caused runaway CPU and RAM until restart. Contributed by @eleboucher. (auth-event-walk)
|
||||
- Fixed events being repeatedly re-requested over federation when they were fetched successfully but could not be resolved, and throttled remote event fetches made on behalf of clients. Contributed by @eleboucher. ([#2090](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2090))
|
||||
|
||||
## Improved Documentation
|
||||
|
||||
- Add Open Collective links to docs and restyle action buttons. Contributed by @stratself ([#2269](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2269))
|
||||
|
||||
|
||||
# Continuwuity v26.9.0 (2026-09-16)
|
||||
|
||||
## Features
|
||||
|
||||
Generated
+386
-155
File diff suppressed because it is too large.
Load diff
+75
-38
@@ -12,7 +12,7 @@ license = "Apache-2.0"
|
||||
# See also `rust-toolchain.toml`
|
||||
readme = "README.md"
|
||||
repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
|
||||
version = "26.9.0"
|
||||
version = "26.9.1"
|
||||
|
||||
[workspace.metadata.crane]
|
||||
name = "conduwuit"
|
||||
@@ -66,6 +66,15 @@ default-features = false
|
||||
version = "0.13.0"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.web-push-native]
|
||||
version = "0.5.0"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.p256]
|
||||
version = "0.13.2"
|
||||
default-features = false
|
||||
features = ["ecdsa", "std"]
|
||||
|
||||
# used for checking if an IP is in specific subnets / CIDR ranges easier
|
||||
[workspace.dependencies.ipaddress]
|
||||
version = "0.2.0"
|
||||
@@ -83,6 +92,10 @@ version = "0.1.3"
|
||||
[workspace.dependencies.http]
|
||||
version = "1.3.1"
|
||||
|
||||
# parses the HTTP-date form of Retry-After
|
||||
[workspace.dependencies.httpdate]
|
||||
version = "1.0.3"
|
||||
|
||||
[workspace.dependencies.regex]
|
||||
version = "1.11.1"
|
||||
|
||||
@@ -150,6 +163,7 @@ features = [
|
||||
"hickory-dns",
|
||||
"http2",
|
||||
"stream",
|
||||
"form",
|
||||
]
|
||||
|
||||
[workspace.dependencies.serde]
|
||||
@@ -334,7 +348,7 @@ version = "1.1.1"
|
||||
# Used for matrix spec type definitions and helpers
|
||||
[workspace.dependencies.ruma]
|
||||
git = "https://github.com/ruma/ruma.git"
|
||||
rev = "83d80c8d869e0ba09becbf7e7378eefc7377cfdb"
|
||||
rev = "62659d64f712adf3cad126df6b8969f785414bd5"
|
||||
features = [
|
||||
"appservice-api-c",
|
||||
"client-api",
|
||||
@@ -365,11 +379,16 @@ features = [
|
||||
"unstable-msc4380",
|
||||
"unstable-msc4143",
|
||||
"unstable-msc4293",
|
||||
"unstable-msc4363",
|
||||
"unstable-msc4406",
|
||||
"unstable-msc4439",
|
||||
"unstable-msc4354",
|
||||
"unstable-msc4480",
|
||||
"unstable-msc4466",
|
||||
"unstable-msc4494",
|
||||
"unstable-msc4484",
|
||||
"unstable-msc4540",
|
||||
"unstable-msc4560",
|
||||
"unstable-extensible-events",
|
||||
]
|
||||
|
||||
@@ -398,20 +417,36 @@ version = "4.0.1"
|
||||
|
||||
# optional opentelemetry, performance measurements, flamegraphs, etc for performance measurements and monitoring
|
||||
[workspace.dependencies.opentelemetry]
|
||||
version = "0.32.0"
|
||||
version = "0.33.0"
|
||||
|
||||
[workspace.dependencies.opentelemetry-instrumentation-tower]
|
||||
version = "0.19.0"
|
||||
default-features = false
|
||||
features = ["axum"]
|
||||
|
||||
[workspace.dependencies.opentelemetry-semantic-conventions]
|
||||
version = "0.33.0"
|
||||
features = ["semconv_experimental"]
|
||||
|
||||
[workspace.dependencies.tracing-flame]
|
||||
version = "0.2.0"
|
||||
|
||||
[workspace.dependencies.tracing-opentelemetry]
|
||||
version = "0.33.0"
|
||||
version = "0.34.0"
|
||||
|
||||
[workspace.dependencies.opentelemetry_sdk]
|
||||
version = "0.32.0"
|
||||
version = "0.33.0"
|
||||
features = ["rt-tokio"]
|
||||
|
||||
[workspace.dependencies.opentelemetry-prometheus]
|
||||
version = "0.33.0"
|
||||
|
||||
[workspace.dependencies.prometheus]
|
||||
version = "0.14.0"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.opentelemetry-otlp]
|
||||
version = "0.32.0"
|
||||
version = "0.33.0"
|
||||
features = ["http", "grpc-tonic", "trace", "logs", "metrics"]
|
||||
|
||||
|
||||
@@ -791,37 +826,37 @@ codegen-units = 16
|
||||
#
|
||||
|
||||
[workspace.lints.rust]
|
||||
absolute-paths-not-starting-with-crate = "warn"
|
||||
#box-pointers = "warn"
|
||||
deprecated-in-future = "warn"
|
||||
elided-lifetimes-in-paths = "warn"
|
||||
explicit-outlives-requirements = "warn"
|
||||
ffi-unwind-calls = "warn"
|
||||
keyword-idents = "warn"
|
||||
macro-use-extern-crate = "warn"
|
||||
meta-variable-misuse = "warn"
|
||||
missing-abi = "warn"
|
||||
#missing-copy-implementations = "warn" # TODO
|
||||
#missing-debug-implementations = "warn" # TODO
|
||||
non-ascii-idents = "warn"
|
||||
rust-2021-incompatible-closure-captures = "warn"
|
||||
rust-2021-incompatible-or-patterns = "warn"
|
||||
rust-2021-prefixes-incompatible-syntax = "warn"
|
||||
rust-2021-prelude-collisions = "warn"
|
||||
single-use-lifetimes = "warn"
|
||||
trivial-casts = "warn"
|
||||
trivial-numeric-casts = "warn"
|
||||
unit-bindings = "warn"
|
||||
#unnameable-types = "warn" # TODO
|
||||
unreachable-pub = "warn"
|
||||
unsafe-op-in-unsafe-fn = "warn"
|
||||
unstable-features = "warn"
|
||||
unused-extern-crates = "warn"
|
||||
unused-import-braces = "warn"
|
||||
unused-lifetimes = "warn"
|
||||
unused-macro-rules = "warn"
|
||||
unused-qualifications = "warn"
|
||||
#unused-results = "warn" # TODO
|
||||
absolute_paths_not_starting_with_crate = "warn"
|
||||
#box_pointers = "warn"
|
||||
deprecated_in_future = "warn"
|
||||
elided_lifetimes_in_paths = "warn"
|
||||
explicit_outlives_requirements = "warn"
|
||||
ffi_unwind_calls = "warn"
|
||||
keyword_idents = { level = "warn", priority = -1 }
|
||||
macro_use_extern_crate = "warn"
|
||||
meta_variable_misuse = "warn"
|
||||
missing_abi = "warn"
|
||||
#missing_copy_implementations = "warn" # TODO
|
||||
#missing_debug_implementations = "warn" # TODO
|
||||
non_ascii_idents = "warn"
|
||||
rust_2021_incompatible_closure_captures = "warn"
|
||||
rust_2021_incompatible_or_patterns = "warn"
|
||||
rust_2021_prefixes_incompatible_syntax = "warn"
|
||||
rust_2021_prelude_collisions = "warn"
|
||||
single_use_lifetimes = "warn"
|
||||
trivial_casts = "warn"
|
||||
trivial_numeric_casts = "warn"
|
||||
unit_bindings = "warn"
|
||||
#unnameable_types = "warn" # TODO
|
||||
unreachable_pub = "warn"
|
||||
unsafe_op_in_unsafe_fn = "warn"
|
||||
unstable_features = "warn"
|
||||
unused_extern_crates = "warn"
|
||||
unused_import_braces = "warn"
|
||||
unused_lifetimes = "warn"
|
||||
unused_macro_rules = "warn"
|
||||
unused_qualifications = "warn"
|
||||
#unused_results = "warn" # TODO
|
||||
|
||||
## some sadness
|
||||
mismatched_lifetime_syntaxes = "allow" # TODO!
|
||||
@@ -875,6 +910,7 @@ significant_drop_tightening = { level = "allow", priority = 1 } # TODO
|
||||
pedantic = { level = "warn", priority = -1 }
|
||||
|
||||
## some sadness
|
||||
assert_is_empty = { level = "allow", priority = 1 }
|
||||
too_long_first_doc_paragraph = { level = "allow", priority = 1 }
|
||||
doc_markdown = { level = "allow", priority = 1 }
|
||||
enum_glob_use = { level = "allow", priority = 1 }
|
||||
@@ -917,7 +953,6 @@ float_cmp_const = "warn"
|
||||
fn_to_numeric_cast_any = "warn"
|
||||
format_push_string = "warn"
|
||||
get_unwrap = "warn"
|
||||
impl_trait_in_params = "warn"
|
||||
lossy_float_literal = "warn"
|
||||
mem_forget = "warn"
|
||||
missing_assert_message = "warn"
|
||||
@@ -962,6 +997,8 @@ let_underscore_future = { level = "allow", priority = 1 }
|
||||
# rust doesnt understand conduwuit's custom log macros
|
||||
literal_string_with_formatting_args = { level = "allow", priority = 1 }
|
||||
|
||||
# This lint is stupid, there's no point defining generics for simple trait params
|
||||
impl_trait_in_params = { level = "allow", priority = 1 }
|
||||
|
||||
needless_raw_string_hashes = "allow"
|
||||
|
||||
|
||||
@@ -1,49 +1,77 @@
|
||||
# continuwuity
|
||||
# Continuwuity
|
||||
|
||||
<!-- ANCHOR: catchphrase -->
|
||||
## A community-driven [Matrix](https://matrix.org/) homeserver
|
||||
|
||||
## A community-driven [Matrix](https://matrix.org/) homeserver in Rust
|
||||
[![Chat on Matrix][matrix-chat-badge]][matrix-chatroom]
|
||||
[![Join the space][matrix-space-badge]][matrix-space]
|
||||
[![Open Collective backers and sponsors][opencollective-contributors-badge]][opencollective]
|
||||
|
||||
[](https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) [](https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org)
|
||||
|
||||
|
||||
|
||||
<!-- ANCHOR_END: catchphrase -->
|
||||
[matrix-chat-badge]: https://img.shields.io/matrix/continuwuity%3Acontinuwuity.org?server_fqdn=matrix.continuwuity.org&fetchMode=summary&logo=matrix
|
||||
[matrix-chatroom]: https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org
|
||||
[matrix-space-badge]: https://img.shields.io/matrix/space%3Acontinuwuity.org?server_fqdn=matrix.continuwuity.org&fetchMode=summary&logo=matrix&label=space
|
||||
[matrix-space]: https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org
|
||||
[opencollective-contributors-badge]: https://img.shields.io/opencollective/all/continuwuity
|
||||
[opencollective]: https://opencollective.com/continuwuity
|
||||
|
||||
[continuwuity] is a Matrix homeserver written in Rust.
|
||||
It's the official community continuation of the [conduwuit](https://github.com/girlbossceo/conduwuit) homeserver.
|
||||
|
||||
<!-- ANCHOR: body -->
|
||||
[![forgejo.ellis.link][forge-badge]][forge-link]
|
||||
[![Stars][forge-stars-badge]][forge-stars-link]
|
||||
[![Issues][forge-issues-badge]][forge-issues-link]
|
||||
[![Pull Requests][forge-pulls-badge]][forge-pulls-link]
|
||||
|
||||
[](https://forgejo.ellis.link/continuwuation/continuwuity) [](https://forgejo.ellis.link/continuwuation/continuwuity/stars) [](https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open) [](https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open)
|
||||
[![GitHub][github-badge]][github-link] ![Stars][github-stars-badge] -
|
||||
[![Codeberg][codeberg-badge]][codeberg-link] [![Stars][codeberg-stars-badge]][codeberg-stars-link] -
|
||||
[![GitLab][gitlab-badge]][gitlab-link] [![Stars][gitlab-stars-badge]][gitlab-stars-link]
|
||||
|
||||
[](https://github.com/continuwuity/continuwuity) [](https://github.com/continuwuity/continuwuity/stargazers)
|
||||
<br>
|
||||
<a href="https://opencollective.com/continuwuity" target="_blank">
|
||||
<img src="https://opencollective.com/webpack/donate/button.png?color=blue" width="250"/>
|
||||
</a>
|
||||
|
||||
[](https://gitlab.com/continuwuity/continuwuity) [](https://gitlab.com/continuwuity/continuwuity/-/starrers)
|
||||
[forge-badge]: https://img.shields.io/badge/Ellis%20Git-main+packages-green?style=flat&logo=forgejo&labelColor=fff
|
||||
[forge-link]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
[forge-stars-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/stars.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-stars-link]: https://forgejo.ellis.link/continuwuation/continuwuity/stars
|
||||
[forge-issues-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/issues/open.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-issues-link]: https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open
|
||||
[forge-pulls-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/pulls/open.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-pulls-link]: https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open
|
||||
|
||||
[](https://codeberg.org/continuwuity/continuwuity) [](https://codeberg.org/continuwuity/continuwuity/stars)
|
||||
[github-badge]: https://img.shields.io/badge/GitHub-mirror-blue?style=flat&logo=github&labelColor=fff&logoColor=24292f
|
||||
[github-link]: https://github.com/continuwuity/continuwuity
|
||||
[github-stars-badge]: https://img.shields.io/github/stars/continuwuity/continuwuity?style=flat
|
||||
[gitlab-badge]:https://img.shields.io/badge/GitLab-mirror-blue?style=flat&logo=gitlab&labelColor=fff
|
||||
[gitlab-link]: https://gitlab.com/continuwuity/continuwuity
|
||||
[gitlab-stars-badge]: https://img.shields.io/gitlab/stars/continuwuity/continuwuity?style=flat
|
||||
[gitlab-stars-link]: https://gitlab.com/continuwuity/continuwuity/-/starrers
|
||||
[codeberg-badge]:https://img.shields.io/badge/Codeberg-mirror-2185D0?style=flat&logo=codeberg&labelColor=fff
|
||||
[codeberg-link]: https://codeberg.org/continuwuity/continuwuity
|
||||
[codeberg-stars-badge]: https://codeberg.org/continuwuity/continuwuity/badges/stars.svg?style=flat
|
||||
[codeberg-stars-link]: https://codeberg.org/continuwuity/continuwuity/stars
|
||||
|
||||
### Why does this exist?
|
||||
## Why does this exist?
|
||||
|
||||
The original conduwuit project has been archived and is no longer maintained. Rather than letting this Rust-based Matrix homeserver disappear, a group of community contributors have forked the project to continue its development, fix outstanding issues, and add new features.
|
||||
|
||||
We aim to provide a stable, well-maintained alternative for current conduwuit users and welcome newcomers seeking a lightweight, efficient Matrix homeserver.
|
||||
|
||||
### Who are we?
|
||||
## Who are we?
|
||||
|
||||
We are a group of Matrix enthusiasts, developers and system administrators who have used conduwuit and believe in its potential. Our team includes both previous
|
||||
contributors to the original project and new developers who want to help maintain and improve this important piece of Matrix infrastructure.
|
||||
|
||||
We operate as an open community project, welcoming contributions from anyone interested in improving continuwuity.
|
||||
|
||||
### What is Matrix?
|
||||
## What is Matrix?
|
||||
|
||||
[Matrix](https://matrix.org) is an open, federated, and extensible network for
|
||||
decentralized communication. Users from any Matrix homeserver can chat with users from all
|
||||
other homeservers over federation. Matrix is designed to be extensible and built on top of.
|
||||
You can even use bridges such as Matrix Appservices to communicate with users outside of Matrix, like a community on Discord.
|
||||
|
||||
### What are the project's goals?
|
||||
## What are the project's goals?
|
||||
|
||||
Continuwuity aims to:
|
||||
|
||||
@@ -55,11 +83,11 @@ Continuwuity aims to:
|
||||
- Create a sustainable development model for long-term maintenance
|
||||
- Keep a lightweight, efficient codebase that can run on modest hardware
|
||||
|
||||
### Can I try it out?
|
||||
## Can I try it out?
|
||||
|
||||
Check out the [documentation](https://continuwuity.org) for installation instructions.
|
||||
Check out our [website](https://continuwuity.org) for installation instructions. Start with the [deployment section](https://continuwuity.org/deploying).
|
||||
|
||||
If you want to try it out as a user, we have some partnered homeservers you can use:
|
||||
If you want to try it out as a user, we have some partnered homeservers you can join:
|
||||
* You can head over to [https://federated.nexus](https://federated.nexus/) in your browser.
|
||||
* Hit the `Apply to Join` button. Once your request has been accepted, you will receive an email with your username and password.
|
||||
* Head over to [https://app.federated.nexus](https://app.federated.nexus/) and you can sign in there, or use any other matrix chat client you wish elsewhere.
|
||||
@@ -67,31 +95,20 @@ If you want to try it out as a user, we have some partnered homeservers you can
|
||||
|
||||
* There's also [https://continuwuity.rocks/](https://continuwuity.rocks/). You can register a new account using Cinny via [this convenient link](https://app.cinny.in/register/continuwuity.rocks), or you can use Element or another matrix client *that supports registration*.
|
||||
|
||||
### What are we working on?
|
||||
## Can I migrate my data from X?
|
||||
|
||||
We're working our way through all of the issues in the [Forgejo project](https://forgejo.ellis.link/continuwuation/continuwuity/issues).
|
||||
|
||||
- [Packaging & availability in more places](https://forgejo.ellis.link/continuwuation/continuwuity/issues/747)
|
||||
- [Appservices bugs & features](https://forgejo.ellis.link/continuwuation/continuwuity/issues?q=&type=all&state=open&labels=178&milestone=0&assignee=0&poster=0)
|
||||
- [Improving compatibility and spec compliance](https://forgejo.ellis.link/continuwuation/continuwuity/issues?labels=119)
|
||||
- Automated testing
|
||||
- [Admin API](https://forgejo.ellis.link/continuwuation/continuwuity/issues/748)
|
||||
- [Policy-list controlled moderation](https://forgejo.ellis.link/continuwuation/continuwuity/issues/750)
|
||||
|
||||
### Can I migrate my data from x?
|
||||
|
||||
- Conduwuit: Yes
|
||||
- Conduit: No, database is now incompatible
|
||||
- Grapevine: No, database is now incompatible
|
||||
- Dendrite: No
|
||||
- Synapse: No
|
||||
- **Conduwuit**: Yes
|
||||
- **Conduit**: No, database is now incompatible
|
||||
- **Grapevine**: No, database is now incompatible
|
||||
- **Dendrite**: No
|
||||
- **Synapse**: No
|
||||
|
||||
We haven't written up a guide on migrating from incompatible homeservers yet. Reach out to us if you need to do this!
|
||||
|
||||
<!-- ANCHOR_END: body -->
|
||||
|
||||
## Contribution
|
||||
|
||||
See our [Contributing page](CONTRIBUTING.md) for more details.
|
||||
|
||||
### Development flow
|
||||
|
||||
- Features / changes must developed in a separate branch
|
||||
@@ -104,7 +121,6 @@ We haven't written up a guide on migrating from incompatible homeservers yet. Re
|
||||
|
||||
The main branch is always green!
|
||||
|
||||
|
||||
### Policy on pulling from other forks
|
||||
|
||||
We welcome contributions from other forks of conduwuit, subject to our review process.
|
||||
@@ -117,13 +133,18 @@ When incorporating code from other forks:
|
||||
- We prioritize stability and compatibility when evaluating external contributions
|
||||
- Features that align with our project goals will be given priority consideration
|
||||
|
||||
<!-- ANCHOR: footer -->
|
||||
## Donate to us!
|
||||
|
||||
#### Contact
|
||||
If you like what we're doing, consider donating to our [**Open Collective**][opencollective]!
|
||||
|
||||
You can also donate individually to each of the maintainers:
|
||||
|
||||
- Nex: https://timedout.uk/donate.html
|
||||
- Jade: https://jade.ellis.link/sponsors
|
||||
- Ginger: https://github.com/sponsors/gingershaped
|
||||
|
||||
## Contact
|
||||
|
||||
Join our [Matrix room](https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) and [space](https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) to chat with us about the project!
|
||||
|
||||
<!-- ANCHOR_END: footer -->
|
||||
|
||||
|
||||
[continuwuity]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
@@ -0,0 +1,3 @@
|
||||
Implemented unstable support for [MSC4560] (Stripped state requests over federation). Contributed by @ginger.
|
||||
|
||||
[MSC4560]: https://github.com/matrix-org/matrix-spec-proposals/pull/4560
|
||||
@@ -0,0 +1 @@
|
||||
Added support for [MSC4484](https://github.com/matrix-org/matrix-spec-proposals/pull/4484). Clients which use the built-in Matrix server administration APIs will need to ask for the appropriate scope when signing in with OAuth. Contributed by @ginger.
|
||||
@@ -0,0 +1 @@
|
||||
Profile banners are now treated as images when imported from OIDC claims, like avatars already were.
|
||||
@@ -0,0 +1 @@
|
||||
Added support for MSC4363 (OAuth step-up authentication). Contributed by @ginger.
|
||||
@@ -0,0 +1 @@
|
||||
For deployments using OIDC with `profile_key_import_mode` set to `on_login`, users' avatars will no longer be clobbered if they didn't change their avatar since their last login.
|
||||
@@ -0,0 +1 @@
|
||||
The userinfo endpoint is now accessible even if federation is disabled, allowing LiveKit to be used on servers with federation disabled without using the server name whitelist.
|
||||
@@ -0,0 +1 @@
|
||||
Add support for using custom DNS servers instead of using /etc/resolv.conf. Contributed by @s1lv3r.
|
||||
@@ -0,0 +1 @@
|
||||
Invitees are now added as room creators when creating a v12+ trusted private chat. Contributed by @ginger.
|
||||
@@ -0,0 +1 @@
|
||||
Continuwuity now supports configuring additional trusted audience values for deployments using OIDC with an IDP that sends them. Contributed by @ginger
|
||||
@@ -0,0 +1 @@
|
||||
Add the Authentication section to document available auth methods for Continuwuity. The "delegated authentication" guide has also been migrated to here. Contributed by @stratself.
|
||||
@@ -0,0 +1 @@
|
||||
Add a guide for push notifications, detailing how it works, push gateway specifics, troubleshooting common issues, and pointing to external guides for UnifiedPush backends. Contributed by @stratself
|
||||
@@ -0,0 +1 @@
|
||||
The deploying page now includes vital general information about installing Continuwuity: release tracks, update steps, and post-installation recommendations. Contributed by @stratself
|
||||
@@ -0,0 +1 @@
|
||||
Fixed push gateway URLs containing the configured notification path outside of their suffix. Contributed by @eleboucher.
|
||||
@@ -0,0 +1 @@
|
||||
Add some missing instructions on configuring Continuwuity on the RPM page. Users are encouraged to use the [generic deploying docs](https://continuwuity.org/deploying/generic) for the bulk of guidance anyhow. Contributed by @stratself
|
||||
@@ -0,0 +1 @@
|
||||
Better, more succinct [introduction page](https://continuwuity.org/introduction.html). Contributed by @stratself
|
||||
@@ -0,0 +1 @@
|
||||
"!admin users list" now hides deactivated users by default, but can display them with the optional "--show-deactivated" flag. "--hide-suspended" and "--hide-locked" have been added as well, which stop suspended and locked users from being displayed respectively. Contributed by @Clubs.
|
||||
@@ -0,0 +1 @@
|
||||
Added support for [MSC4494: Membership-based invite blocking](https://github.com/matrix-org/matrix-spec-proposals/pull/4494)
|
||||
@@ -0,0 +1 @@
|
||||
"!admin users change-email" now verifies a user exists before attempting to change their email. Contributed by @Clubs.
|
||||
@@ -0,0 +1 @@
|
||||
`!admin token issue` can no longer issue registration tokens when `allow_registration` is false. Contributed by @Clubs.
|
||||
@@ -0,0 +1 @@
|
||||
Fixed URL preview image MIME types and rejected failed downloads. Contributed by @eleboucher.
|
||||
@@ -0,0 +1 @@
|
||||
Appservices now receive typing indicators and read receipts. Contributed by @Jade
|
||||
@@ -0,0 +1 @@
|
||||
Correctly set RocksDB column options, including enabling block caches. Contributed by @Jade
|
||||
@@ -0,0 +1 @@
|
||||
Added opt-in OpenTelemetry metrics, exported over OTLP or scraped by Prometheus from `/_continuwuity/metrics`, and a Grafana dashboard. Contributed by @eleboucher.
|
||||
+383
-47
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -10,7 +10,7 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean
|
||||
|
||||
# Match Rustc version as close as possible
|
||||
# rustc -vV
|
||||
ARG LLVM_VERSION=22
|
||||
ARG LLVM_VERSION=23
|
||||
# ENV RUSTUP_TOOLCHAIN=${RUST_VERSION}
|
||||
|
||||
# Install repo tools
|
||||
@@ -50,7 +50,7 @@ EOF
|
||||
|
||||
# Developer tool versions
|
||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||
ENV BINSTALL_VERSION=1.23.0
|
||||
ENV BINSTALL_VERSION=1.25.3
|
||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||
ENV CARGO_SBOM_VERSION=0.9.1
|
||||
# renovate: datasource=crate depName=lddtree
|
||||
|
||||
@@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/etc/apk/cache apk add \
|
||||
|
||||
# Developer tool versions
|
||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||
ENV BINSTALL_VERSION=1.23.0
|
||||
ENV BINSTALL_VERSION=1.25.3
|
||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||
ENV CARGO_SBOM_VERSION=0.9.1
|
||||
# renovate: datasource=crate depName=lddtree
|
||||
|
||||
+8
-3
@@ -2,7 +2,12 @@
|
||||
{
|
||||
"type": "file",
|
||||
"name": "introduction",
|
||||
"label": "Continuwuity"
|
||||
"label": "Introduction"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"name": "deploying",
|
||||
"label": "Deploying"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
@@ -11,8 +16,8 @@
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"name": "deploying",
|
||||
"label": "Deploying"
|
||||
"name": "authentication",
|
||||
"label": "Authentication"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Authentication
|
||||
|
||||
This chapter describes various ways to authenticate to Continuwuity.
|
||||
|
||||
## Authentication flows
|
||||
|
||||
Continuwuity implements the following authentication flows:
|
||||
|
||||
- **OAuth login** (also known as **next-gen auth**): clients redirect the user to Continuwuity's own login and registration page to complete the authentication process.
|
||||
- **Legacy login** (also known as the **User Interactive Authentication** framework): clients provide their own UI to log in to or register with the server directly.
|
||||
|
||||
Different sets of clients support different flows, but most clients are moving towards next-gen auth. One can set which login modes are allowed via the `compatibility_mode` variable of the `[global.oauth]` config file section.
|
||||
|
||||
:::important Configure your client well-known for OAuth logins
|
||||
|
||||
To ensure OAuth logins work, Continuwuity must know the base URL its Client-Server API is being served on:
|
||||
|
||||
```toml
|
||||
[global.well_known]
|
||||
client = "https://matrix.example.com"
|
||||
```
|
||||
|
||||
Refer to the [delegation](./guides/delegation) documentation for more details.
|
||||
|
||||
:::
|
||||
|
||||
## Authentication sources
|
||||
|
||||
Continuwuity can read user authentication data from the following sources:
|
||||
|
||||
- **Internal authentication** - this is the default setup, where Continuwuity reads user authentication data from its local database. It allows for registration, email, and password reset self-service. See the [**internal authentication documentation**](./authentication/internal).
|
||||
|
||||
- **Delegated authentication** - in this mode, the server connects to an OpenID Connect identity provider for user authentication. This method allows for integrating with single sign-on services, but enabling it will disable legacy logins. See the [**delegated authentication documentation**](./authentication/oidc).
|
||||
|
||||
Only one authentication source can be used at a time.
|
||||
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"type": "file",
|
||||
"name": "internal",
|
||||
"label": "Internal authentication"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "oidc",
|
||||
"label": "Delegated authentication (OIDC)"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,46 @@
|
||||
# Internal authentication
|
||||
|
||||
Continuwuity comes with an internal database for user authentication, which it uses by default. This allows for self-servicing of account registration, linking emails, and password resets.
|
||||
|
||||
## Registration
|
||||
|
||||
Registration is disabled by default. To enable it, set `allow_registration = true` in your config file and use at least one of the registration methods below.
|
||||
|
||||
| Method | Description | Additional configuration needed |
|
||||
| ------ | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 1 | Admin-issued tokens (recommended) | None. Use the [`!admin token issue`](../reference/admin/token#admin-token-issue) command |
|
||||
| 2 | Static registration token | `registration_token` or `registration_token_file` |
|
||||
| 3 | Token + email | Method 1 or 2 + `require_email_for_token_registration = true` in `[global.smtp]`. See [Email configuration](#email-configuration) |
|
||||
| 4 | Email-only registration | `require_email_for_registration = true` in `[global.smtp]` section. See [Email configuration](#email-configuration) |
|
||||
| 5 | reCAPTCHA-only registration | `recaptcha_site_key` and `recaptcha_private_site_key` |
|
||||
| 6 | Email + reCAPTCHA registration | Methods 4 + 5 |
|
||||
|
||||
Admin-issued tokens are the recommended registration method. These tokens are well suited for private or invite-only servers, and they can be scoped with an expiry duration or given a usage limit. See the [`!admin token`](../reference/admin/token) commands for more details.
|
||||
|
||||
Other registration methods are meant for **untrusted, public registration**. Care must be taken when allowing these modes of operation.
|
||||
|
||||
## Email configuration
|
||||
|
||||
Continuwuity can be configured to send emails via an SMTP relay of your choice. These are used for verifying user email addresses and sending password reset links to them.
|
||||
|
||||
A user is associated with only **one** email address at a time.
|
||||
|
||||
All email options are in the `[global.smtp]` block of the [configuration file](../reference/config.mdx), and are toggled on when the block is uncommented. For example:
|
||||
|
||||
```toml
|
||||
[global.smtp]
|
||||
# Example URI for the user john@example.com on the `mail.example.net` mail server
|
||||
connection_uri = "smtps://john%40example.com:password@mail.example.net:465"
|
||||
sender = "John's Continuwuity server <john@example.com>"
|
||||
```
|
||||
|
||||
A user's email address can also be modified by the [`!admin users change-email`](../reference/admin/users#admin-users-change-email) command. To view current user-email associations, use the `!admin users get-email` and `!admin users get-user-by-email` command.
|
||||
|
||||
Use [`!admin debug send-test-email`](../reference/admin/debug#admin-debug-send-test-email) to test that your email setup is working.
|
||||
|
||||
## Password resets
|
||||
|
||||
Password resets in Continuwuity can be made via:
|
||||
|
||||
- Self-service password resets. This requires a user's email to have been set up and verified.
|
||||
- Using the [`!admin users reset-password`](../reference/admin/users#admin-users-reset-password) command.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Delegated authentication with OIDC
|
||||
|
||||
Continuwuity supports delegating user authentication to an external identity provider that implements the OpenID Connect (OIDC) specification, such as Authentik, Kanidm, or Keycloak.
|
||||
|
||||
:::important Delegated authentication and legacy logins
|
||||
When delegated authentication is configured, Continuwuity will disable its support for legacy logins. **Only clients that support OAuth** will be able to login.
|
||||
:::
|
||||
|
||||
An account on the homeserver can only be associated with one OIDC subject claim - that is, one account on the identity provider - at a time. Linking an account will also prevent the user from deactivating it themselves.
|
||||
|
||||
## Instructions
|
||||
|
||||
A simple OIDC configuration is as easy as creating a new OIDC application in your identity provider's settings and supplying Continuwuity with the client ID and client secret.
|
||||
|
||||
### Configuring the OIDC provider
|
||||
|
||||
This guide will use [**Kanidm**][kanidm] as an example, but the described steps are broadly applicable to other identity providers. Contributions for them are welcome.
|
||||
|
||||
First, create a new application for Continuwuity in your identity provider.
|
||||
|
||||
```sh
|
||||
# Here, `c10y` is the client ID that Kanidm will use, and `Continuwuity` is the display name.
|
||||
# Other identity providers may generate a client ID for you.
|
||||
# Use the domain that clients can reach Continuwuity at, which may not be the same as your server name
|
||||
# if you have configured well-known delegation.
|
||||
kanidm system oauth2 create c10y Continuwuity https://matrix.yourdomain.com
|
||||
```
|
||||
|
||||
Configure the redirect URL that Continuwuity uses.
|
||||
|
||||
```sh
|
||||
kanidm system oauth2 add-redirect-url c10y https://matrix.yourdomain.com/_continuwuity/oidc/complete
|
||||
```
|
||||
|
||||
Allow Continuwuity to request the `openid` scope. Other identity providers may not require this step.
|
||||
|
||||
```sh
|
||||
kanidm system oauth2 update-scope-map c10y idm_all_persons openid
|
||||
```
|
||||
|
||||
Find the client secret that was generated. Other identity providers may show this information in their web UI.
|
||||
```sh
|
||||
kanidm system oauth2 show-basic-secret c10y
|
||||
d1qgx352kkuvs1j70b6w293d65x68jve1f7b27fyk90gjhpr
|
||||
```
|
||||
|
||||
[kanidm]: https://kanidm.com
|
||||
|
||||
### Configuring Continuwuity
|
||||
|
||||
Configure Continuwuity with the client ID, client secret, and discovery URL provided from the steps above. Kanidm has a different discovery URL for each client, but other identity providers may have a single discovery URL at the root of their domain.
|
||||
|
||||
```toml
|
||||
[global.oauth.oidc]
|
||||
|
||||
# `/.well-known/openid-configuration` will be appended automatically
|
||||
discovery_url = "https://idm.example.com/oauth2/openid/c10y"
|
||||
|
||||
# This may be randomly generated by your identity provider. Kanidm requires
|
||||
# you to set it manually when you create the application.
|
||||
client_id = "c10y"
|
||||
|
||||
# From the previous step
|
||||
client_secret = "d1qgx352kkuvs1j70b6w293d65x68jve1f7b27fyk90gjhpr"
|
||||
```
|
||||
|
||||
### Testing that it works
|
||||
|
||||
Finally, restart Continuwuity, and log out and back in again. Your client should prompt you to continue in your web browser and open a webpage with the Continuwuity logo that allows you to continue in your identity provider. Once you log in successfully there, you will be prompted to choose a user ID -- to link your existing account, enter its user ID, and then your old password.
|
||||
|
||||
Continuwuity offers several additional configuration options to tweak its integration with your identity provider. Review the `[global.oauth.oidc]` section towards the bottom of the [reference configuration](../reference/config) for a complete list of options and documentation.
|
||||
|
||||
## Advanced options
|
||||
|
||||
### Minting tokens for non-OIDC accounts
|
||||
|
||||
With OIDC delegation enabled, accounts without an OIDC mapping (such as bot accounts) can still be created via the admin commands, but will not be able to log in to the homeserver. To accommodate this, homeserver admins can use the [`!admin users issue-token`](../reference/admin/users#admin-users-issue-token) command to issue tokens for them. This command requires the account to have set a local password, which can be done with [`!admin users reset-password`](../reference/admin/users#admin-users-reset-password).
|
||||
|
||||
### Manually linking users to OIDC claims
|
||||
|
||||
To view associations between local users and their linked subject claim, issue the following command:
|
||||
|
||||
```
|
||||
!admin query raw raw-iter openidsubject_localpart
|
||||
("1d3fc994-3947-406d-b22c-0fc529baf235", "john")
|
||||
("ba543628-e6a5-45d8-9bd2-6cc497400136", "jane")
|
||||
```
|
||||
|
||||
These associations can be changed manually with the [`!admin oidc`](../reference/admin/oidc) commands, which are useful to debug some account linkage issues. For example, to link the user `jane` to a new Subject Identifier claim of `721c36a8-ce04-4474-8e97-b62655b07340`:
|
||||
|
||||
```
|
||||
!admin oidc unlink ba543628-e6a5-45d8-9bd2-6cc497400136
|
||||
Subject `ba543628-e6a5-45d8-9bd2-6cc497400136` unlinked.
|
||||
!admin oidc link jane 721c36a8-ce04-4474-8e97-b62655b07340
|
||||
Subject `721c36a8-ce04-4474-8e97-b62655b07340` linked to account @jane:example.com.
|
||||
!admin query raw raw-iter openidsubject_localpart
|
||||
("1d3fc994-3947-406d-b22c-0fc529baf235", "john")
|
||||
("721c36a8-ce04-4474-8e97-b62655b07340", "jane")
|
||||
```
|
||||
|
||||
### Decommissioning OIDC delegation
|
||||
|
||||
It is possible to revert to using the internal database for authentication. First, comment out the `[global.oauth.oidc]` section in your config file and restart the homeserver. Then, execute the [`!admin users reset-password --convert-to-local-account`](../reference/admin/users#admin-users-reset-password) for each user to assign them a local password and convert their linked accounts into local ones.
|
||||
@@ -37,6 +37,10 @@ CONTINUWUITY_ANTISPAM__DRAUPNIR__BASE_URL="https://draupnir.example.com"
|
||||
# Alternatively, you can pass a (quoted) struct to define an entire section
|
||||
# This maps to the [global.well_known] section
|
||||
CONTINUWUITY_WELL_KNOWN="{ client=https://example.com,server=example.com:443 }"
|
||||
|
||||
# Options that take a list are written as a (quoted) array
|
||||
CONTINUWUITY_TRUSTED_SERVERS='["matrix.org"]'
|
||||
CONTINUWUITY_PORT='[8008, 8448]'
|
||||
```
|
||||
|
||||
### Alternative prefixes
|
||||
|
||||
+106
-1
@@ -1,3 +1,108 @@
|
||||
import { OverviewGroup } from '@rspress/core/theme';
|
||||
|
||||
# Deploying
|
||||
|
||||
This chapter describes various ways to deploy Continuwuity.
|
||||
This chapter describes various ways to deploy Continuwuity. Start reading on this page for useful general information, and then proceed to one of the deployment methods.
|
||||
|
||||
:::tip Getting help
|
||||
If you run into any problems while setting up Continuwuity, ask us in [`#continuwuity:continuwuity.org`][support-room] or [open an issue on Forgejo][forgejo-new-issue].
|
||||
:::
|
||||
|
||||
[support-room]: https://matrix.to/#/%23continuwuity:continuwuity.org
|
||||
[forgejo-new-issue]: https://forgejo.ellis.link/continuwuation/continuwuity/issues/new
|
||||
|
||||
## Release tracks
|
||||
|
||||
Continuwuity offers two release tracks to accommodate different needs: tracking the **main branch** of the [repository], and following the regular **release schedule**.
|
||||
|
||||
### Main branch
|
||||
|
||||
As Continuwuity is rapidly evolving software, we encourage deployments to follow the main branch to receive the latest fixes and features. Commits in main are stable and have been thoroughly tested by the maintainers before merging.
|
||||
|
||||
To be notified of updates to main, it is best to [**track the `/changelog.d` directory**][changelog-d] in the repository, which contains changelog snippets from merged pull requests. These may contain breaking changes. Then, proceed to update or build Continuwuity according to your deployment method.
|
||||
|
||||
[repository]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
[changelog-d]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/changelog.d
|
||||
|
||||
### Regular releases
|
||||
|
||||
Regular releases are periodic, versioned cutoffs from the main branch from time to time, and can be found on the [Releases] page. They are suitable in cases where updating more frequently is not viable, such as when using third-party packaging.
|
||||
|
||||
For regular releases, **always read the release notes before upgrading to a new version**, as they may contain breaking changes that affect your deployment.
|
||||
|
||||
[Releases]: https://forgejo.ellis.link/continuwuation/continuwuity/releases
|
||||
|
||||
## Installation
|
||||
|
||||
:::info Mind the name!
|
||||
The binary for Continuwuity is called `conduwuit`, and the configuration file `conduwuit.toml`.
|
||||
:::
|
||||
|
||||
To have Continuwuity working, you will generally need to:
|
||||
|
||||
1. Have a domain name pointing to your server's IP address - we will be using `example.com` in our guides.
|
||||
2. Download or build Continuwuity from your preferred source.
|
||||
3. Configure Continuwuity via the config file or environment variables. See the [Configuration](./configuration.mdx) page for more.
|
||||
4. Employ a reverse proxy in front of Continuwuity - we will mainly provide examples for Caddy in our guides.
|
||||
5. And finally, start the Continuwuity service.
|
||||
|
||||
Navigate to your preferred method of deploying Continuwuity as listed below, and follow the instructions there.
|
||||
|
||||
<OverviewGroup
|
||||
group={{
|
||||
items: [
|
||||
{
|
||||
"link": "deploying/generic",
|
||||
"text": "Generic"
|
||||
},
|
||||
{
|
||||
"link": "deploying/docker",
|
||||
"text": "Docker"
|
||||
},
|
||||
{
|
||||
"link": "deploying/debian",
|
||||
"text": "Debian"
|
||||
},
|
||||
{
|
||||
"link": "deploying/rpm",
|
||||
"text": "RPM"
|
||||
},
|
||||
{
|
||||
"link": "deploying/nixos",
|
||||
"text": "NixOS"
|
||||
},
|
||||
{
|
||||
"link": "deploying/arch-linux",
|
||||
"text": "Arch Linux"
|
||||
},
|
||||
{
|
||||
"link": "deploying/freebsd",
|
||||
"text": "FreeBSD"
|
||||
},
|
||||
{
|
||||
"link": "deploying/kubernetes",
|
||||
"text": "Kubernetes"
|
||||
},
|
||||
{
|
||||
"link": "deploying/nomad",
|
||||
"text": "Nomad"
|
||||
}
|
||||
],
|
||||
}}
|
||||
/>
|
||||
|
||||
## Post-installation
|
||||
|
||||
After Continuwuity is up and running, consider the following:
|
||||
|
||||
- For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](./guides/dns.mdx) (strongly recommended).
|
||||
|
||||
- To set up Audio/Video communication, see the [**Calls**](./calls.mdx) page.
|
||||
|
||||
- See the [**Authentication chapter**](./authentication.mdx) for various ways to access to your homeserver, such as logging in with an external OIDC provider.
|
||||
|
||||
- Consult the [**Maintenance**](./maintenance.mdx) page for guidance on maintaining your homeserver.
|
||||
|
||||
- If you want to set up an appservice, take a look at the [**Appservice Guide**](./appservices.mdx).
|
||||
|
||||
- See the [**Troubleshooting**](./troubleshooting.mdx) page for commonly diagnosed issues.
|
||||
@@ -29,6 +29,11 @@
|
||||
"name": "arch-linux",
|
||||
"label": "Arch Linux"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "freebsd",
|
||||
"label": "FreeBSD"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "kubernetes",
|
||||
@@ -38,10 +43,5 @@
|
||||
"type": "file",
|
||||
"name": "nomad",
|
||||
"label": "Nomad"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "freebsd",
|
||||
"label": "FreeBSD"
|
||||
}
|
||||
]
|
||||
@@ -1,5 +1,11 @@
|
||||
# Continuwuity for Arch Linux
|
||||
|
||||
Continuwuity is available in the `archlinuxcn` repository and AUR with the same package name `continuwuity`, which includes the latest tagged version. The development version is available on AUR as `continuwuity-git`.
|
||||
Continuwuity is available in the [`archlinuxcn`][archlinuxcn] repository and AUR with the same package name, [`continuwuity`][aur-continuwuity].
|
||||
|
||||
Simply install the `continuwuity` package. Configure the service in `/etc/conduwuit/conduwuit.toml`, then enable and start the continuwuity.service.
|
||||
The development version is available on the AUR as [`continuwuity-git`][aur-continuwuity-git].
|
||||
|
||||
[archlinuxcn]: https://www.archlinuxcn.org/
|
||||
[aur-continuwuity]: https://aur.archlinux.org/packages/continuwuity
|
||||
[aur-continuwuity-git]: https://aur.archlinux.org/packages/continuwuity-git
|
||||
|
||||
Simply install the `continuwuity` package. Configure the service in `/etc/conduwuit/conduwuit.toml`, then enable and start the `continuwuity.service`.
|
||||
+12
-11
@@ -1,15 +1,17 @@
|
||||
# Continuwuity for Docker
|
||||
|
||||
This page describes how to deploy Continuwuity via Docker containers. Make sure that you have installed `docker` on your system before continuing.
|
||||
|
||||
## Preparation
|
||||
|
||||
### Choose an image
|
||||
|
||||
The following OCI images are available for Continuwuity:
|
||||
|
||||
| Image | Notes |
|
||||
| Image | Notes |
|
||||
| ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**latest**][latest] | Latest tagged release. (recommended) |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**main**][main] | Latest `main` branch commit. Built with [CI][release-image] |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**latest**][latest] | Latest tagged release. |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**main**][main] | Latest `main` branch commit. Built with [CI][release-image] |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**latest-maxperf**][latest-maxperf] | Latest tagged release, [performance optimised version](./generic.mdx#performance-optimised-builds). |
|
||||
| [https://forgejo.ellis.link/continuwuation/continuwuity:**main-maxperf**][main-maxperf] | Latest `main` branch commit, [performance optimised version](./generic.mdx#performance-optimised-builds). |
|
||||
|
||||
@@ -210,7 +212,13 @@ docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Other deployment methods
|
||||
## What's next?
|
||||
|
||||
Navigate to [Post-installation](../deploying.mdx#post-installation) for next steps.
|
||||
|
||||
---
|
||||
|
||||
## Appendix - Other deployment methods
|
||||
|
||||
### Docker - Quick Run
|
||||
|
||||
@@ -289,10 +297,3 @@ From there you can access the server's console by running `docker attach <contai
|
||||
Note that using `CTRL+c` within `docker attach`'s context will forward the signal to the server, stopping it. See [Docker's reference][docker-attach-reference] for more information.
|
||||
|
||||
[docker-attach-reference]: https://docs.docker.com/reference/cli/docker/container/attach/
|
||||
|
||||
## Next steps
|
||||
|
||||
- For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](../guides/dns.mdx) (recommended)
|
||||
- To set up Audio/Video communication, see the [**Calls**](../calls.mdx) page.
|
||||
- Consult the [Maintenance](../maintenance.mdx) page for guidance on maintaining your homeserver.
|
||||
- If you want to set up an appservice, take a look at the [**Appservice Guide**](../appservices.mdx).
|
||||
@@ -4,4 +4,6 @@ Continuwuity doesn't provide official FreeBSD packages; however, a community-mai
|
||||
|
||||
Please see the installation instructions in that repository. Direct any questions to its issue tracker or to [@katie:kat5.dev](https://matrix.to/#/@katie:kat5.dev).
|
||||
|
||||
For general BSD support, please join our [Continuwuity BSD](https://matrix.to/#/%23bsd:continuwuity.org) community room.
|
||||
For general BSD support, please join our [Continuwuity support room][support-room].
|
||||
|
||||
[support-room]: https://matrix.to/#/%23continuwuity:continuwuity.org
|
||||
@@ -1,12 +1,6 @@
|
||||
# Generic deployment documentation
|
||||
|
||||
:::tip Getting help
|
||||
If you run into any problems while setting up Continuwuity, ask us in
|
||||
`#continuwuity:continuwuity.org` or [open an issue on
|
||||
Forgejo][forgejo-new-issue].
|
||||
:::
|
||||
|
||||
[forgejo-new-issue]: https://forgejo.ellis.link/continuwuation/continuwuity/issues/new
|
||||
This page provides instructions on deploying Continuwuity on a generic Linux distro via a systemd service file. It also contains common routing instructions for reverse proxies.
|
||||
|
||||
## Installing Continuwuity
|
||||
|
||||
@@ -270,11 +264,9 @@ curl https://example.com/_matrix/client/versions
|
||||
|
||||
## What's next?
|
||||
|
||||
- For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](../guides/dns.mdx) (recommended)
|
||||
- To configure OIDC login with an identity provider, see the [**delegated authentication guide**](../guides/oidc.mdx).
|
||||
- For Audio/Video call functionality see the [**Calls**](../calls.md) page.
|
||||
- Consult the [Maintenance](../maintenance.mdx) page for guidance on maintaining your homeserver.
|
||||
- If you want to set up an appservice, take a look at the [**Appservice Guide**](../appservices.md).
|
||||
Navigate to [Post-installation](../deploying.mdx#post-installation) for next steps.
|
||||
|
||||
---
|
||||
|
||||
## Appendix
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ spec:
|
||||
value: "https://matrix.example.com"
|
||||
- name: CONTINUWUITY_ALLOW_REGISTRATION
|
||||
value: "false"
|
||||
- name: RUST_LOG
|
||||
- name: CONTINUWUITY_LOG
|
||||
value: info
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
|
||||
+36
-20
@@ -1,4 +1,4 @@
|
||||
import { Tab, Tabs} from '@rspress/core/theme';
|
||||
import { Tab, Tabs } from '@rspress/core/theme';
|
||||
|
||||
# RPM Installation Guide
|
||||
|
||||
@@ -28,7 +28,7 @@ Available for openSUSE Tumbleweed, Slowroll, and [supported Leap versions](https
|
||||
|
||||
## Installation methods
|
||||
|
||||
### Stable releases (recommended)
|
||||
### Stable releases
|
||||
|
||||
<Tabs groupId="distro">
|
||||
<Tab label="Fedora">
|
||||
@@ -49,6 +49,7 @@ openSUSE packages are available through an openSUSE Build Service project namesp
|
||||
</Tabs>
|
||||
|
||||
### Nightly releases
|
||||
|
||||
Nightly versions are built from the latest commit on the `main` branch every 24 hours.
|
||||
|
||||
<Tabs groupId="distro">
|
||||
@@ -68,14 +69,22 @@ In the meantime, you may follow the [generic deployment instructions](generic).
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Service management and removal
|
||||
## Configuration
|
||||
|
||||
**Systemd service commands**
|
||||
Consult the [generic deployment instructions](./generic.mdx) for detailed steps. You will at least need to adjust the config file located at `/etc/conduwuit/conduwuit.toml` to suit your needs, and configure a [reverse proxy](./generic.mdx#setting-up-the-reverse-proxy).
|
||||
|
||||
## Service management
|
||||
|
||||
Now, you can start your Continuwuity service with:
|
||||
|
||||
```bash
|
||||
# Start the service
|
||||
sudo systemctl start conduwuit
|
||||
```
|
||||
|
||||
Other useful commands include:
|
||||
|
||||
```bash
|
||||
# Enable on boot
|
||||
sudo systemctl enable conduwuit
|
||||
|
||||
@@ -84,27 +93,13 @@ sudo systemctl status conduwuit
|
||||
|
||||
# View logs
|
||||
sudo journalctl -u conduwuit -f
|
||||
```
|
||||
|
||||
**Uninstallation**
|
||||
|
||||
```bash
|
||||
# Stop and disable the service
|
||||
# Stopping the service
|
||||
sudo systemctl stop conduwuit
|
||||
sudo systemctl disable conduwuit
|
||||
|
||||
# Remove the package
|
||||
sudo dnf remove continuwuity # replace `dnf` with `zypper` on openSUSE
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**GPG key errors**: Temporarily disable GPG checking
|
||||
|
||||
```bash
|
||||
sudo dnf --nogpgcheck install continuwuity
|
||||
```
|
||||
|
||||
**Repository metadata issues**: Clear and rebuild cache
|
||||
|
||||
```bash
|
||||
@@ -122,7 +117,28 @@ dnf --showduplicates list continuwuity
|
||||
sudo dnf install continuwuity-<version>
|
||||
```
|
||||
|
||||
## Building locally
|
||||
## What's next?
|
||||
|
||||
Navigate to [Post-installation](../deploying.mdx#post-installation) for next steps.
|
||||
|
||||
---
|
||||
|
||||
## Appendix
|
||||
|
||||
### Uninstallation
|
||||
|
||||
To uninstall Continuwuity:
|
||||
|
||||
```bash
|
||||
# Stop and disable the service
|
||||
sudo systemctl stop conduwuit
|
||||
sudo systemctl disable conduwuit
|
||||
|
||||
# Remove the package
|
||||
sudo dnf remove continuwuity # replace `dnf` with `zypper` on openSUSE
|
||||
```
|
||||
|
||||
### Building locally
|
||||
|
||||
<Tabs groupId="distro">
|
||||
<Tab label="Fedora">
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "oidc",
|
||||
"label": "Delegated authentication"
|
||||
"name": "metrics",
|
||||
"label": "Metrics"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"name": "push",
|
||||
"label": "Push notifications"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,100 @@
|
||||
# Metrics
|
||||
|
||||
Continuwuity records metrics with OpenTelemetry and can export them in two ways, both disabled by default:
|
||||
|
||||
- **Prometheus scraping** from `/_continuwuity/metrics`
|
||||
- **OTLP push**, alongside traces
|
||||
|
||||
## Prometheus
|
||||
|
||||
```toml
|
||||
[global]
|
||||
allow_prometheus_metrics = true
|
||||
prometheus_metrics_token = "a-long-random-secret"
|
||||
```
|
||||
|
||||
The endpoint is served on the same listener as the rest of the server. Either set `prometheus_metrics_token` or block `/_continuwuity/metrics` at your reverse proxy so it is not publicly readable.
|
||||
|
||||
```yaml
|
||||
scrape_configs:
|
||||
- job_name: continuwuity
|
||||
scheme: https
|
||||
metrics_path: /_continuwuity/metrics
|
||||
authorization:
|
||||
credentials: a-long-random-secret
|
||||
static_configs:
|
||||
- targets: ["matrix.example.com"]
|
||||
```
|
||||
|
||||
## OTLP
|
||||
|
||||
Requires the `otlp_telemetry` feature, enabled in default builds.
|
||||
|
||||
```toml
|
||||
[global]
|
||||
allow_otlp_metrics = true
|
||||
```
|
||||
|
||||
Configure the exporter with standard OpenTelemetry environment variables:
|
||||
|
||||
```sh
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
|
||||
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf # or "grpc"
|
||||
OTEL_METRIC_EXPORT_INTERVAL=15000
|
||||
```
|
||||
|
||||
`service.instance.id` defaults to the server name, and `OTEL_RESOURCE_ATTRIBUTES` or `OTEL_SERVICE_NAME` override the defaults.
|
||||
|
||||
Prometheus can receive OTLP directly when started with `--web.enable-otlp-receiver`, using `http://prometheus:9090/api/v1/otlp` as the endpoint.
|
||||
|
||||
## Exported metrics
|
||||
|
||||
Names below are as they appear in Prometheus. OTLP uses the dotted OpenTelemetry names, such as `continuwuity.sender.events`. HTTP and process metrics follow the OpenTelemetry semantic conventions.
|
||||
|
||||
| Metric | Type | Labels | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `target_info` | gauge | `service_version`, `service_instance_id` | Running server version and name |
|
||||
| `http_server_request_duration_seconds` | histogram | `http_request_method`, `http_route`, `http_response_status_code`, `network_protocol_name`, `network_protocol_version`, `url_scheme` | Handled HTTP requests, by route template |
|
||||
| `http_server_active_requests` | gauge | `http_request_method`, `url_scheme` | Requests currently being handled |
|
||||
| `http_server_request_body_size_bytes` | histogram | HTTP request duration labels | Request body sizes, when `Content-Length` is supplied |
|
||||
| `http_server_response_body_size_bytes` | histogram | HTTP request duration labels | Response body sizes, when known |
|
||||
| `continuwuity_federation_incoming_transaction_duration_seconds` | histogram | `outcome` | Processing time of incoming transactions |
|
||||
| `continuwuity_federation_incoming_transactions_active` | gauge | | Incoming transactions currently being processed |
|
||||
| `continuwuity_federation_incoming_pdus_total` | counter | `type`, `outcome` | Incoming PDUs by event type and outcome: `accepted`, `forbidden`, `invalid`, `error` or `unparsable` |
|
||||
| `continuwuity_federation_incoming_pdu_duration_seconds` | histogram | `outcome` | Time to handle an incoming PDU |
|
||||
| `continuwuity_federation_incoming_pdu_lag_seconds` | histogram | | Time between an accepted PDU's `origin_server_ts` and its arrival |
|
||||
| `continuwuity_federation_incoming_edus_total` | counter | `type` | Incoming EDUs by type |
|
||||
| `continuwuity_federation_incoming_edu_duration_seconds` | histogram | `type` | Time to handle an incoming EDU |
|
||||
| `continuwuity_federation_outgoing_request_duration_seconds` | histogram | `outcome` | Outgoing federation requests |
|
||||
| `continuwuity_federation_destinations` | gauge | `state` | Remote servers in retry `backoff` or with a `stale` destination cache entry |
|
||||
| `continuwuity_sender_transaction_duration_seconds` | histogram | `destination`, `outcome` | Outgoing federation, appservice and push transactions |
|
||||
| `continuwuity_sender_events_total` | counter | `destination`, `kind`, `outcome` | PDUs and EDUs sent in outgoing transactions |
|
||||
| `continuwuity_sender_events_queued_total` | counter | `destination`, `kind` | PDUs and EDUs queued for sending |
|
||||
| `continuwuity_sender_queue_depth` | gauge | | Messages waiting for the sender workers |
|
||||
| `continuwuity_users` | gauge | `origin` | Known `local` users, including deactivated, and `remote` users |
|
||||
| `continuwuity_invites_total` | counter | `direction`, `destination`, `outcome` | Invites sent by local users or received over federation |
|
||||
| `continuwuity_media_write_size_bytes` | histogram | `origin` | Media files written, from local uploads or cached remote media |
|
||||
| `continuwuity_media_read_size_bytes` | histogram | `origin` | Media files served |
|
||||
| `continuwuity_media_files` | gauge | | Stored media files, including thumbnails |
|
||||
| `continuwuity_antispam_checks_total` | counter | `check`, `outcome` | Antispam service checks; denials include the service being unreachable |
|
||||
| `continuwuity_database_size_bytes` | gauge | | Total size of RocksDB SST files |
|
||||
| `continuwuity_database_memory_bytes` | gauge | `name` | RocksDB memtable, table reader and row cache usage |
|
||||
| `continuwuity_database_block_cache_bytes` | gauge | `column` | RocksDB block cache usage |
|
||||
| `continuwuity_cache_entries` | gauge | `name` | Entries in the auth chain and state info caches |
|
||||
| `continuwuity_jemalloc_memory_bytes` | gauge | `kind` | jemalloc statistics, only with the `jemalloc_stats` feature |
|
||||
| `process_uptime_seconds` | gauge | | Time since the server started |
|
||||
| `process_cpu_time_seconds_total` | counter | `cpu_mode` | CPU time used by the process |
|
||||
| `process_memory_usage_bytes` | gauge | | Resident memory (Linux) |
|
||||
| `process_memory_virtual_bytes` | gauge | | Virtual memory (Linux) |
|
||||
| `process_unix_file_descriptor_count` | gauge | | Open file descriptors (Linux) |
|
||||
| `continuwuity_tokio_workers` | gauge | | Tokio runtime worker threads |
|
||||
| `continuwuity_tokio_alive_tasks` | gauge | | Alive tokio tasks |
|
||||
| `continuwuity_tokio_global_queue_depth` | gauge | | Tasks in the tokio global queue |
|
||||
| `continuwuity_tokio_worker_busy_time_seconds_total` | counter | | Time worker threads spent busy |
|
||||
| `continuwuity_tokio_worker_parks_total` | counter | | Number of times worker threads parked |
|
||||
|
||||
User and media file counts are estimates taken from RocksDB (`rocksdb.estimate-num-keys`), so they may lag slightly or drift after deletions.
|
||||
|
||||
## Grafana dashboard
|
||||
|
||||
Import [grafana-dashboard.json](/guides/grafana-dashboard.json) under **Dashboards → New → Import**, or provision it from a file.
|
||||
@@ -1,56 +0,0 @@
|
||||
# Configuring delegated authentication
|
||||
|
||||
Continuwuity supports delegating user authentication to an external identity provider that implements the OpenID Connect specification, such as Authentik, kanidm, or Keycloak.
|
||||
|
||||
:::warning{title="OIDC versus OAuth, and supported clients"}
|
||||
**OIDC** is not to be confused with **OAuth**. In the context of Matrix, OAuth is the protocol that Matrix clients use to authenticate with the _homeserver_. OIDC is the protocol that the _homeserver_ uses to communicate with the _identity provider_. Continuwuity supports OAuth by default, alongside the legacy **UIAA** authentication framework.
|
||||
|
||||
When OIDC is configured, Continuwuity will disable its support for legacy authentication. **Only clients that support OAuth**, such as the Element family of clients, will be able to log in when OIDC is configured. If your client of choice shows an error when you try to log in after configuring OIDC, it likely does not support OAuth. This is an issue with your client, not Continuwuity, and should be reported to your client's developers.
|
||||
:::
|
||||
|
||||
A simple OIDC configuration is as easy as creating a new OIDC application in your identity provider's settings and supplying Continuwuity with the client ID and client secret. This guide will use kanidm as an example, but the described steps are broadly applicable to other identity providers.
|
||||
|
||||
First, create a new application for Continuwuity in your identity provider.
|
||||
```sh
|
||||
# Here, `c10y` is the client ID that kanidm will use, and `Continuwuity` is the display name.
|
||||
# Other identity providers may generate a client ID for you.
|
||||
# Use the domain that clients can reach Continuwuity at, which may not be the same as your server name
|
||||
# if you have configured well-known delegation.
|
||||
kanidm system oauth2 create c10y Continuwuity https://matrix.yourdomain.com
|
||||
```
|
||||
|
||||
Configure the redirect URL that Continuwuity uses.
|
||||
```sh
|
||||
kanidm system oauth2 add-redirect-url c10y https://matrix.yourdomain.com/_continuwuity/oidc/complete
|
||||
```
|
||||
|
||||
Allow Continuwuity to request the `openid` scope. Other identity providers may not require this step.
|
||||
```sh
|
||||
kanidm system oauth2 update-scope-map c10y idm_all_persons openid
|
||||
```
|
||||
|
||||
Find the client secret that was generated. Other identity providers may show this information in their web UI.
|
||||
```sh
|
||||
kanidm system oauth2 show-basic-secret c10y
|
||||
d1qgx352kkuvs1j70b6w293d65x68jve1f7b27fyk90gjhpr
|
||||
```
|
||||
|
||||
Configure Continuwuity with the client ID, client secret, and discovery URL. kanidm has a different discovery URL for each client, but other identity providers may have a single discovery URL at the root of their domain.
|
||||
|
||||
```toml
|
||||
[global.oauth.oidc]
|
||||
|
||||
# `/.well-known/openid-configuration` will be appended automatically
|
||||
discovery_url = "https://idm.example.com/oauth2/openid/c10y"
|
||||
|
||||
# This may be randomly generated by your identity provider. kanidm requires
|
||||
# you to set it manually when you create the application.
|
||||
client_id = "c10y"
|
||||
|
||||
# From the previous step
|
||||
client_secret = "d1qgx352kkuvs1j70b6w293d65x68jve1f7b27fyk90gjhpr"
|
||||
```
|
||||
|
||||
Finally, restart Continuwuity, and log out and back in again. Your client should prompt you to continue in your web browser and open a webpage with the Continuwuity logo that allows you to continue in your identity provider. Once you log in successfully, you will be prompted to choose a user ID -- to link your existing account, enter its user ID, and then your old password when prompted.
|
||||
|
||||
Continuwuity offers several additional configuration options to tweak its integration with your identity provider. Review the `[global.oauth.oidc]` section towards the bottom of the [reference configuration](../reference/config) for a complete list of options and documentation.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,215 @@
|
||||
import { Tab, Tabs } from '@rspress/core/theme';
|
||||
|
||||
# Push notifications
|
||||
|
||||
Matrix clients receive notifications in the following ways:
|
||||
|
||||
- **In-band notifications**, which are shown when the client actively syncs with the server.
|
||||
- **Push notifications**, which are posted to the client by the server through an external push service. This is typically used to send out-of-band notifications to mobile devices, and it is the focus of this page.
|
||||
|
||||
Generally, your mobile device is preconfigured for push notifications out of the box. The details below are for advanced use cases, such as using an alternative push backend (like UnifiedPush) or hosting your own.
|
||||
|
||||
## Overview
|
||||
|
||||
Continuwuity supports two push methods: the legacy **Matrix Push Gateway** and the new **Web Push** protocol. The former is currently supported by more clients, but the latter enables end-to-end-encrypted push notifications. They work as follows:
|
||||
|
||||
<Tabs groupId="push-ops">
|
||||
<Tab label="Registration">
|
||||
<img src="./push-registration.webp"
|
||||
alt="Diagram showing the push registration flow, described in the text below."
|
||||
style= {{"max-height":300,display:"flex",margin:"1rem auto","border-radius":"5px"}}
|
||||
/>
|
||||
|
||||
1. A client app obtains a _push key_ from the push app that it hooks up to.
|
||||
2. Then, it registers a _pusher_ with Continuwuity, bringing along the _push key_ and the following additional information:
|
||||
- For the Push Gateway method: The _push gateway_ URL, which is [provided by the client](#unifiedpush-and-push-gateways).
|
||||
- For the Web Push method: Some _encryption details_ generated by the client, so the server knows how to encrypt its push payloads.
|
||||
|
||||
</Tab>
|
||||
|
||||
<Tab label="Operation (Push Gateway)">
|
||||
<img src="./push-operation-gateway.webp"
|
||||
alt="Diagram showing the push operation with the Push Gateway method, described in the text below."
|
||||
style={{"max-height":300,display:"flex",margin:"1rem auto","border-radius":"5px"}}
|
||||
/>
|
||||
|
||||
1. Continuwuity pushes messages to the push gateway
|
||||
2. The push gateway converts the messages to a suitable format and forwards them to the push provider server.
|
||||
3. The push provider server passes them along to the push app.
|
||||
4. The push app wakes the client, prompting it to fetch new messages from Continuwuity.
|
||||
5. Finally, the client calculates against a set of _push rules_ to determine whether the fetched message(s) should be notified to users.
|
||||
|
||||
</Tab>
|
||||
|
||||
<Tab label="Operation (Web Push)">
|
||||
<img src="./push-operation-webpush.webp"
|
||||
alt="Diagram showing the push operation with the Web Push method, described in the text below."
|
||||
style={{"max-height":300,display:"flex",margin:"1rem auto","border-radius":"5px"}}
|
||||
/>
|
||||
|
||||
1. Continuwuity pushes encrypted messages to the push provider server.
|
||||
2. The push provider server passes them along to the push app.
|
||||
3. The push app wakes the client, which decrypts the payload, and if needed, fetches new messages from Continuwuity.
|
||||
4. Finally, the client calculates against a set of _push rules_ to determine whether the pushed message(s) should be notified to users.
|
||||
|
||||
Note that this mechanism does not require a push gateway component.
|
||||
|
||||
[MSC4174]: https://github.com/matrix-org/matrix-spec-proposals/pull/4174
|
||||
|
||||
</Tab>
|
||||
|
||||
</Tabs>
|
||||
|
||||
_([excalidraw file of the diagrams](/guides/push-notifications.excalidraw))_
|
||||
|
||||
Therefore, Continuwuity's role within this system is to keep track of client-registered _pushers_ and send relevant payloads to them. To view and manage these pushers, use the [`!admin query pusher`](../reference/admin/query.md#admin-query-pusher) set of commands.
|
||||
|
||||
## UnifiedPush
|
||||
|
||||
[UnifiedPush][unifiedpush] is an open and self-hostable notifications system that is supported by many Matrix clients on Android and Linux. It is compatible with both the Web Push and Push Gateway mechanisms, and therefore requires no additional setup from the homeserver.
|
||||
|
||||
:::info Debugging UnifiedPush
|
||||
To debug and test your UnifiedPush installation, use the [UP-Example] app for Android and the [UnifiedPush Troubleshooter] app for Linux distributions.
|
||||
:::
|
||||
|
||||
[unifiedpush]: https://unifiedpush.org
|
||||
[UP-Example]: https://codeberg.org/UnifiedPush/android-example
|
||||
[UnifiedPush Troubleshooter]: https://flathub.org/en/apps/org.unifiedpush.Troubleshooter
|
||||
|
||||
### UnifiedPush and push gateways
|
||||
|
||||
The push gateway URL is usually pre-configured by the client app. However, some clients (such as Element X) implement UnifiedPush's [Gateway Discovery] mechanism, and attempt to detect a push gateway _on the same domain as the push provider_, before falling back to a hardcoded one.
|
||||
|
||||
Per the [spec][spec-push-gateway-api], these push gateways must be available on the `/_matrix/push/v1/notify` path of said domain. To test that a push gateway is accessible to the homeserver, make a request for it from the homeserver's IP:
|
||||
|
||||
```txt
|
||||
curl https://push.example.com/_matrix/push/v1/notify
|
||||
{"unifiedpush":{"gateway":"matrix"}}
|
||||
```
|
||||
|
||||
[Gateway Discovery]: https://unifiedpush.org/users/gateway/#discovery--hosting
|
||||
|
||||
### ntfy
|
||||
|
||||
[ntfy][ntfy] is a widely supported UnifiedPush implementation, with an easy-to-install push app and plenty of publicly available instances. Its server includes an embedded Matrix push gateway and can be self-hosted.
|
||||
|
||||
Some tutorials on self-hosting ntfy can be found below:
|
||||
|
||||
- [Official ntfy self-hosting tutorial][official-ntfy-selfhosting]
|
||||
- [Element's tutorial on Unified Push and ntfy][element-ntfy]
|
||||
|
||||
:::warning Avoid ntfy.sh
|
||||
Avoid using the `https://ntfy.sh` push server, which is configured as the default in the ntfy app. This server is known to ratelimit requests aggressively.
|
||||
:::
|
||||
|
||||
[ntfy]: https://ntfy.sh
|
||||
[element-ntfy]: https://docs.element.io/latest/element-support/element-androidios-client-settings/using-unified-push-and-ntfy-for-push-notifications/
|
||||
[official-ntfy-selfhosting]: https://docs.ntfy.sh/install/
|
||||
|
||||
### Other UnifiedPush distributors
|
||||
|
||||
To find a list of other UnifiedPush distributors, visit this [page][unifiedpush-distributors].
|
||||
|
||||
[unifiedpush-distributors]: https://unifiedpush.org/users/distributors/
|
||||
|
||||
Community tutorials for selfhosting some of these stacks are listed below. Unless stated otherwise, they are all tested against Element X Android and the push gateway mechanism, but they should work with Web Push as well.
|
||||
|
||||
- [Self-hosting Sunup for Matrix and UnifiedPush][kimiblock-selfhosting-sunup], by Kimiblock.
|
||||
- Push gateway: [common-proxies]
|
||||
- Push server: [autopush-rs]
|
||||
- Push app: [Sunup][sunup]
|
||||
- [Matrix notifications on Android, powered by XMPP][stratself-xmpp], by stratself.
|
||||
- Push gateway: [common-proxies]
|
||||
- Push server: [ejabberd's mod_unified_push]
|
||||
- Push app: [Conversations] (and forks)
|
||||
- [Element X push notifications via Conversations][alfredolin-xmpp], by Alfredo Lin.
|
||||
- Push gateway: [common-proxies]
|
||||
- Push server: [Prosody's mod_unified_push]
|
||||
- Push app: [Conversations]
|
||||
- Nextcloud's NextPush flow, which uses the following stack:
|
||||
- Push server + push gateway: [uppush] (selfhosting tutorial included)
|
||||
- Push app: [NextPush Android]
|
||||
|
||||
[kimiblock-selfhosting-sunup]: https://blog.kimiblock.top/2025/09/11/selfhosting-sunup/
|
||||
[stratself-xmpp]: https://muoi.me/~stratself/articles/matrix-notifs-xmpp
|
||||
[alfredolin-xmpp]: https://alfredolin.eu/blog/2026/07/24/element-x-push-notifications-via-conversations/
|
||||
[common-proxies]: https://codeberg.org/UnifiedPush/common-proxies/
|
||||
[sunup]: https://codeberg.org/Sunup/android
|
||||
[autopush-rs]: https://github.com/mozilla-services/autopush-rs
|
||||
[ejabberd's mod_unified_push]: https://github.com/processone/ejabberd-contrib/tree/master/mod_unified_push
|
||||
[Prosody's mod_unified_push]: https://modules.prosody.im/mod_unified_push
|
||||
[Conversations]: https://conversations.im
|
||||
[uppush]: https://codeberg.org/NextPush/uppush
|
||||
[NextPush Android]: https://codeberg.org/NextPush/nextpush-android
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Issues with push notifications can arise from the components of the system beyond your homeserver (for example, if the connection fails between the gateway and the push server). Make sure you check the logs of these components for debugging as well.
|
||||
|
||||
### Locally hosted push gateways / push providers
|
||||
|
||||
Outbound requests, including push notifications, follows the `ip_range_denylist` config option which refuses loopback and private-range destinations by default. This would break against push components that are self-hosted on a LAN address, and will result in these log entries at push creation time:
|
||||
|
||||
```txt
|
||||
WARN conduwuit_service::pusher: Pusher URL is a forbidden remote address url=https://push.example.com/_matrix/push/v1/notify
|
||||
```
|
||||
|
||||
To fix this, remove your push gateway or push server's address from `ip_range_denylist`, and restart Continuwuity to apply the changes.
|
||||
|
||||
### Push notifications not audible/not displaying
|
||||
|
||||
This is likely an issue with your account's _push rules_, which determines which events are shown to to the user as notifications. Check these push rules in the client's notifications settings and tweak accordingly. Continuwuity also provides an [`!admin users reset-push-rules`](../reference/admin/users#admin-users-reset-push-rules) command, which restores the rules to the default of notifying for every message.
|
||||
|
||||
Another reason may be that push background services are frequently being terminated by your operating system, which is a [well-known problem][dontkillmyapp] with many Android-based systems. To fix this, follow your operating system's instructions to exempt your push app from background restrictions.
|
||||
|
||||
Otherwise, if you find Continuwuity not sending push notifications according to the spec, feel free to discuss in our [support room][support-room] or open an issue.
|
||||
|
||||
[dontkillmyapp]: https://dontkillmyapp.com
|
||||
[support-room]: https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org
|
||||
|
||||
### Various "Could not send request to pusher" log entries
|
||||
|
||||
If you find spurious log entries like this in your Continuwuity deployment:
|
||||
|
||||
```txt
|
||||
WARN push{user_id="@user:example.com" pushkey="very-long-string-of-letters" events=1}:send_push_notice:send_notice:send_request: conduwuit_service::pusher: Could not send request to pusher https//push.example.com: error sending request for url (https://push.example.com/_matrix/push/v1/notify)
|
||||
```
|
||||
|
||||
Then, your server is most likely sending push requests to too many invalid targets. This could be due to one of the following reasons:
|
||||
|
||||
#### Connection issues between the server and the push gateway
|
||||
|
||||
Verify that the connection to the push gateway is working correctly. This includes checking firewall rules, DNS, and that the push gateway is online. The section on [locally-hosted gateways/push providers](#locally-hosted-push-gateways--push-providers) may also apply to you.
|
||||
|
||||
#### Expired push endpoints
|
||||
|
||||
Active Matrix clients periodically renew their pushkeys as the old ones expire, and consequently register them against Continuwuity. As these pushers build up over time, the homeserver will keep sending more requests to an increasing number of "dead" push endpoints. This results in the errors seen above, and can heavily impact performance if not mitigated.
|
||||
|
||||
To work around this issue, the following actions can be taken:
|
||||
|
||||
- Delete all of a user's pushers with the [`!admin query pusher delete-all-user`](../reference/admin/query##admin-query-pusher-delete-all-user) command. This command is not typically disruptive, as active clients will re-register new pushers the next time they log on.
|
||||
- Alternatively, delete one's own pushers from a client that supports doing so. Currently this only includes FluffyChat and Element Classic/SchildiChat Legacy.
|
||||
|
||||
While clients are supposed to automatically delete old pushers under their own control, this behaviour has been inconsistent. A further discussion of this issue can be found in [#2242][issue-2242].
|
||||
|
||||
[issue-2242]: https://forgejo.ellis.link/continuwuation/continuwuity/issues/2242
|
||||
|
||||
## Related Documentation
|
||||
|
||||
Specifications:
|
||||
|
||||
- [Matrix specification for the Push Gateway API][spec-push-gateway-api]
|
||||
- [Matrix Client-Server API for push notifications][spec-c-s-push-notifications]
|
||||
- [UnifiedPush specifications][unifiedpush-spec]
|
||||
- [MSC4174: Web push][MSC4174]
|
||||
- [Web Push RFCs][webpush-rfcs]
|
||||
|
||||
Other:
|
||||
|
||||
- [Matrix Push Rules and Notifications][clokep-push] - blogpost on push rules in Matrix
|
||||
|
||||
[webpush-rfcs]: https://datatracker.ietf.org/wg/webpush/documents/
|
||||
[spec-push-gateway-api]: https://spec.matrix.org/latest/push-gateway-api/
|
||||
[spec-c-s-push-notifications]: https://spec.matrix.org/latest/client-server-api/#push-notifications
|
||||
[unifiedpush-spec]: https://unifiedpush.org/developers/spec/definitions/
|
||||
[clokep-push]: https://patrick.cloke.us/posts/2023/05/08/matrix-push-rules-notifications/
|
||||
+3
-28
@@ -15,6 +15,9 @@ hero:
|
||||
- theme: alt
|
||||
text: Star on GitHub
|
||||
link: https://github.com/continuwuity/continuwuity
|
||||
- theme: alt
|
||||
text: Donate to us!
|
||||
link: https://opencollective.com/continuwuity
|
||||
image:
|
||||
src: /assets/logo.svg
|
||||
alt: continuwuity logo
|
||||
@@ -29,33 +32,5 @@ beforeFeatures:
|
||||
link: https://matrix.org/docs/matrix-concepts/elements-of-matrix/
|
||||
buttonText: Read the Guide
|
||||
|
||||
features:
|
||||
- title: 🚀 High Performance
|
||||
details: Built with Rust for exceptional speed and efficiency. Designed to run smoothly even on modest hardware.
|
||||
- title: 🔒 Secure by Default
|
||||
details: Memory-safe Rust implementation with built-in security features to protect your communication.
|
||||
- title: 🌐 Matrix Protocol
|
||||
details: Fully compatible with the Matrix ecosystem. Connect with users across the federated network.
|
||||
- title: 🛠️ Community Maintained
|
||||
details: Actively developed by a dedicated community of Matrix enthusiasts and contributors.
|
||||
- title: 📦 Easy to Deploy
|
||||
details: Multiple deployment options including Docker, NixOS, and traditional package managers.
|
||||
- title: 🔌 Appservice Support
|
||||
details: Bridge to other platforms like Discord, Telegram, and more with Matrix appservices.
|
||||
|
||||
doc: false
|
||||
---
|
||||
|
||||
## What is Continuwuity?
|
||||
|
||||
Continuwuity is a Matrix homeserver.
|
||||
|
||||
Matrix is an open chat network that lets anyone talk to anyone, no matter what server or address they use - sort of like email.
|
||||
|
||||
Continuwuity receives and keeps track of all your messages, and delivers what you send to the right people.
|
||||
|
||||
## Why is Continuwuity different?
|
||||
|
||||
Continuwuity is light and fast, using a fraction of the memory of other major homeservers. It's also simple to set up, and secure by default.
|
||||
|
||||
We are a community run project, filled with diverse and friendly people. Everything is built by people who care about the project volunteering their free time.
|
||||
+86
-70
@@ -1,98 +1,114 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="/assets/logo.svg" width="150"/>
|
||||
|
||||
# Continuwuity
|
||||
|
||||
## A community-driven [Matrix](https://matrix.org/) homeserver in Rust
|
||||
</div>
|
||||
|
||||
[](https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) [](https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org)
|
||||
## What is Continuwuity?
|
||||
|
||||
[continuwuity] is a Matrix homeserver written in Rust.
|
||||
It's the official community continuation of the [conduwuit](https://github.com/girlbossceo/conduwuit) homeserver.
|
||||
Continuwuity is a Matrix homeserver. [Matrix] is an open chat network that lets anyone talk to anyone, no matter what server or address they use, like email.
|
||||
|
||||
[](https://forgejo.ellis.link/continuwuation/continuwuity) [](https://forgejo.ellis.link/continuwuation/continuwuity/stars) [](https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open) [](https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open)
|
||||
Continuwuity receives and keeps track of all your messages, and delivers what you send to the right people.
|
||||
|
||||
[](https://github.com/continuwuity/continuwuity) [](https://github.com/continuwuity/continuwuity/stargazers)
|
||||
[Matrix]: https://matrix.org
|
||||
|
||||
[](https://gitlab.com/continuwuity/continuwuity) [](https://gitlab.com/continuwuity/continuwuity/-/starrers)
|
||||
## Why is Continuwuity different?
|
||||
|
||||
[](https://codeberg.org/continuwuity/continuwuity) [](https://codeberg.org/continuwuity/continuwuity/stars)
|
||||
Continuwuity is light and fast, using a fraction of the resources of other major homeservers. It's also simple to set up, and secure by default.
|
||||
|
||||
## Why does this exist?
|
||||
We are a community-run project, made up of friendly and diverse people. Everything is built by people who care about the project volunteering their free time.
|
||||
|
||||
The original conduwuit project has been archived and is no longer maintained. Rather than letting this Rust-based Matrix homeserver disappear, a group of community contributors have forked the project to continue its development, fix outstanding issues, and add new features.
|
||||
## Deploying Continuwuity
|
||||
|
||||
We aim to provide a stable, well-maintained alternative for current conduwuit users and welcome newcomers seeking a lightweight, efficient Matrix homeserver.
|
||||
Head over to the [**Deploying chapter**](./deploying.mdx) to get started.
|
||||
|
||||
## Who are we?
|
||||
## Try it out!
|
||||
|
||||
We are a group of Matrix enthusiasts, developers and system administrators who have used conduwuit and believe in its potential. Our team includes both previous
|
||||
contributors to the original project and new developers who want to help maintain and improve this important piece of Matrix infrastructure.
|
||||
If you want to try it out as a user, we have some [partnered homeservers](./community/ops-guidelines.mdx) you can use:
|
||||
|
||||
We operate as an open community project, welcoming contributions from anyone interested in improving continuwuity.
|
||||
**`federated.nexus`** - A community resource hosting multiple FOSS (especially federated) services.
|
||||
- Go to https://federated.nexus, click on "Apply to Join", and follow the prompts.
|
||||
- Once your request has been accepted, you will receive an email with your username and password, which you can use to sign in from any Matrix client.
|
||||
- Remember to change your password after logging in!
|
||||
|
||||
## What is Matrix?
|
||||
**`continuwuity.rocks`** - the demo server, run by us.
|
||||
- Sign up using any Matrix client, or via this [convenient link][cinny-register] for Cinny.
|
||||
|
||||
[Matrix](https://matrix.org) is an open, federated, and extensible network for
|
||||
decentralized communication. Users from any Matrix homeserver can chat with users from all
|
||||
other homeservers over federation. Matrix is designed to be extensible and built on top of.
|
||||
You can even use bridges such as Matrix Appservices to communicate with users outside of Matrix, like a community on Discord.
|
||||
[cinny-register]: https://app.cinny.in/register/continuwuity.rocks
|
||||
|
||||
## What are the project's goals?
|
||||
## Donate to us {#donate}
|
||||
|
||||
continuwuity aims to:
|
||||
If you like what we're doing, consider donating to our Open Collective via the button below!
|
||||
|
||||
- Maintain a stable, reliable Matrix homeserver implementation in Rust
|
||||
- Improve compatibility and specification compliance with the Matrix protocol
|
||||
- Fix bugs and performance issues from the original conduwuit
|
||||
- Add missing features needed by homeserver administrators
|
||||
- Provide comprehensive documentation and easy deployment options
|
||||
- Create a sustainable development model for long-term maintenance
|
||||
- Keep a lightweight, efficient codebase that can run on modest hardware
|
||||
<div class="no-zoom" align="center">
|
||||
<br/>
|
||||
<a href="https://opencollective.com/continuwuity" target="_blank">
|
||||
<img src="https://opencollective.com/webpack/donate/button@2x.png?color=blue" width="250"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## Can I try it out?
|
||||
You can also donate individually to each of the maintainers
|
||||
|
||||
Check out the [documentation](https://continuwuity.org) for installation instructions.
|
||||
- Nex: https://timedout.uk/donate.html
|
||||
|
||||
If you want to try it out as a user, we have some partnered homeservers you can use:
|
||||
* You can head over to [https://federated.nexus](https://federated.nexus/) in your browser.
|
||||
* Hit the `Apply to Join` button. Once your request has been accepted, you will receive an email with your username and password.
|
||||
* Head over to [https://app.federated.nexus](https://app.federated.nexus/) and you can sign in there, or use any other matrix chat client you wish elsewhere.
|
||||
* Your username for matrix will be in the form of `@username:federated.nexus`, however you can simply use the `username` part to log in. Your password is your password.
|
||||
- Jade: https://jade.ellis.link/sponsors
|
||||
|
||||
* There's also [https://continuwuity.rocks/](https://continuwuity.rocks/). You can register a new account using Cinny via [this convenient link](https://app.cinny.in/register/continuwuity.rocks), or you can use Element or another matrix client *that supports registration*.
|
||||
|
||||
## What are we working on?
|
||||
|
||||
We're working our way through all of the issues in the [Forgejo project](https://forgejo.ellis.link/continuwuation/continuwuity/issues).
|
||||
|
||||
- [Packaging & availability in more places](https://forgejo.ellis.link/continuwuation/continuwuity/issues/747)
|
||||
- [Appservices bugs & features](https://forgejo.ellis.link/continuwuation/continuwuity/issues?q=&type=all&state=open&labels=178&milestone=0&assignee=0&poster=0)
|
||||
- [Improving compatibility and spec compliance](https://forgejo.ellis.link/continuwuation/continuwuity/issues?labels=119)
|
||||
- Automated testing
|
||||
- [Admin API](https://forgejo.ellis.link/continuwuation/continuwuity/issues/748)
|
||||
- [Policy-list controlled moderation](https://forgejo.ellis.link/continuwuation/continuwuity/issues/750)
|
||||
|
||||
## Can I migrate my data from x?
|
||||
|
||||
- **Conduwuit**: Yes
|
||||
- **Conduit**: No, database is now incompatible
|
||||
- **Grapevine**: No, database is now incompatible
|
||||
- **Dendrite**: No
|
||||
- **Synapse**: No
|
||||
|
||||
We haven't written up a guide on migrating from incompatible homeservers yet. Reach out to us if you need to do this!
|
||||
|
||||
## How can I deploy my own?
|
||||
|
||||
- [Deployment options](deploying)
|
||||
|
||||
If you want to connect an appservice to continuwuity, take a look at the
|
||||
[appservices documentation](appservices).
|
||||
|
||||
## How can I contribute?
|
||||
|
||||
See the [contributor's guide](development/contributing)
|
||||
- Ginger: https://github.com/sponsors/gingershaped
|
||||
|
||||
## Contact
|
||||
|
||||
Join our [Matrix room](https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) and [space](https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org) to chat with us about the project!
|
||||
|
||||
[continuwuity]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
<div class="no-zoom" align="center">
|
||||
|
||||
[![Chat on Matrix][matrix-chat-badge]][matrix-chatroom]
|
||||
[![Join the space][matrix-space-badge]][matrix-space]
|
||||
|
||||
</div>
|
||||
|
||||
[matrix-chat-badge]: https://img.shields.io/matrix/continuwuity%3Acontinuwuity.org?server_fqdn=matrix.continuwuity.org&fetchMode=summary&logo=matrix
|
||||
[matrix-chatroom]: https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org
|
||||
[matrix-space-badge]: https://img.shields.io/matrix/space%3Acontinuwuity.org?server_fqdn=matrix.continuwuity.org&fetchMode=summary&logo=matrix&label=space
|
||||
[matrix-space]: https://matrix.to/#/#space:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org
|
||||
|
||||
|
||||
Our source code and mirrors can be accessed through these buttons:
|
||||
|
||||
<div class="no-zoom" align="center">
|
||||
|
||||
[![forgejo.ellis.link][forge-badge]][forge-link]
|
||||
[![Releases][forge-releases-badge]][forge-releases-link]
|
||||
[![Stars][forge-stars-badge]][forge-stars-link]
|
||||
[![Issues][forge-issues-badge]][forge-issues-link]
|
||||
[![Pull Requests][forge-pulls-badge]][forge-pulls-link]
|
||||
|
||||
[![GitHub][github-badge]][github-link] ![Stars][github-stars-badge] -
|
||||
[![Codeberg][codeberg-badge]][codeberg-link] [![Stars][codeberg-stars-badge]][codeberg-stars-link] -
|
||||
[![GitLab][gitlab-badge]][gitlab-link] [![Stars][gitlab-stars-badge]][gitlab-stars-link]
|
||||
|
||||
</div>
|
||||
|
||||
[forge-badge]: https://img.shields.io/badge/Ellis%20Git-main+packages-green?style=flat&logo=forgejo&labelColor=fff
|
||||
[forge-link]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
[forge-releases-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/release.svg?style=flat&label=Latest%20release&labelColor=fff&color=green
|
||||
[forge-releases-link]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
[forge-stars-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/stars.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-stars-link]: https://forgejo.ellis.link/continuwuation/continuwuity/stars
|
||||
[forge-issues-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/issues/open.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-issues-link]: https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open
|
||||
[forge-pulls-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/pulls/open.svg?style=flat&labelColor=fff&color=8a5cd0
|
||||
[forge-pulls-link]: https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open
|
||||
|
||||
[github-badge]: https://img.shields.io/badge/GitHub-mirror-blue?style=flat&logo=github&labelColor=fff&logoColor=24292f
|
||||
[github-link]: https://github.com/continuwuity/continuwuity
|
||||
[github-stars-badge]: https://img.shields.io/github/stars/continuwuity/continuwuity?style=flat&logo=github
|
||||
[gitlab-badge]:https://img.shields.io/badge/GitLab-mirror-blue?style=flat&logo=gitlab&labelColor=fff
|
||||
[gitlab-link]: https://gitlab.com/continuwuity/continuwuity
|
||||
[gitlab-stars-badge]: https://img.shields.io/gitlab/stars/continuwuity/continuwuity?style=flat
|
||||
[gitlab-stars-link]: https://gitlab.com/continuwuity/continuwuity/-/starrers
|
||||
[codeberg-badge]:https://img.shields.io/badge/Codeberg-mirror-2185D0?style=flat&logo=codeberg&labelColor=fff
|
||||
[codeberg-link]: https://codeberg.org/continuwuity/continuwuity
|
||||
[codeberg-stars-badge]: https://codeberg.org/continuwuity/continuwuity/badges/stars.svg?style=flat
|
||||
[codeberg-stars-link]: https://codeberg.org/continuwuity/continuwuity/stars
|
||||
@@ -6,10 +6,10 @@
|
||||
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"id": 21,
|
||||
"mention_room": true,
|
||||
"date": "2026-08-24",
|
||||
"message": "[Continuwuity 26.8.1](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v26.8.1) has just been released - this is a bug fix and feature release, with one small security patch. Please read the release notes for more information, before updating as soon as possible.\n\nAny questions? Ask in our [support room](https://matrix.to/#/#continuwuity:continuwuity.org)."
|
||||
"date": "2026-09-29",
|
||||
"message": "[Continuwuity 26.9.1](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v26.9.1) has just been released - this update features a fix for a **critical** security issue, please read the release notes for more information."
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -64,7 +64,7 @@ Matrix federation is extremely heavy and sends wild amounts of DNS requests. Thi
|
||||
|
||||
Follow the [**DNS tuning guide**](./guides/dns) for details on setting it up.
|
||||
|
||||
### Intermittent federation failures to a specific server
|
||||
### Intermittent federation failures to a specific server {#intermittent}
|
||||
|
||||
There may be circumstances where servers fail to connect to each other, probably due to a bad DNS cache. In such cases, issuing `!admin debug ping <SERVER_NAME>` would return some errors, and `!admin query resolver cache <SERVER_NAME>` would return a wrong destination endpoint.
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
target:
|
||||
target.fromToolchainName {
|
||||
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
|
||||
sha256 = "sha256-p8h3Sl/YRByZfZTAKXdsvF6xEenXKrXSVvpphmZENH4=";
|
||||
sha256 = "sha256-+xUr6Al1wZSqX8aEsq7DpuFOK4Ve/i+qTl+K5uWQ9GM=";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
Generated
+90
-90
@@ -125,13 +125,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rsbuild/core": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.2.5.tgz",
|
||||
"integrity": "sha512-nf34ri1iZduYhHUr5Vc79L7Eml+IlN0nFIaF/g3OW4WR/gShxuf5wVXS69/H8FTHJYN4SdYlNcefSZQluEMKgA==",
|
||||
"version": "2.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.2.11.tgz",
|
||||
"integrity": "sha512-avPW0j6RaEbtV2mfl0AzTAJEimPX4Xj0pCcZyxNCrE9vkS91HmweM5V7XQj3kI5iTYfHRp9Y6To8RRHYLEvG7A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/core": "~2.2.3",
|
||||
"@rspack/core": "~2.2.8",
|
||||
"@swc/helpers": "^0.5.23"
|
||||
},
|
||||
"bin": {
|
||||
@@ -169,32 +169,32 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.2.3.tgz",
|
||||
"integrity": "sha512-532+T5N6yIdukChiL85H4NFN2vn9oi8wlLa1ByPNtpNYriE9s24fUhn0RiK7w/xACqnNpYmXCqLYCvjOzyCy+w==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.2.8.tgz",
|
||||
"integrity": "sha512-c9flkSua3khHnOKBCRk8BkHGOwU9YB7niv+5JfQXiLZIvJmgKsZ7PD8QrFklMhsJT3oVAc6c9GN7/wy1YkACjA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optionalDependencies": {
|
||||
"@rspack/binding-darwin-arm64": "2.2.3",
|
||||
"@rspack/binding-darwin-x64": "2.2.3",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.2.3",
|
||||
"@rspack/binding-linux-arm64-musl": "2.2.3",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.2.3",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.2.3",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.2.3",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.2.3",
|
||||
"@rspack/binding-linux-x64-gnu": "2.2.3",
|
||||
"@rspack/binding-linux-x64-musl": "2.2.3",
|
||||
"@rspack/binding-wasm32-wasi": "2.2.3",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.2.3",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.2.3",
|
||||
"@rspack/binding-win32-x64-msvc": "2.2.3"
|
||||
"@rspack/binding-darwin-arm64": "2.2.8",
|
||||
"@rspack/binding-darwin-x64": "2.2.8",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.2.8",
|
||||
"@rspack/binding-linux-arm64-musl": "2.2.8",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.2.8",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.2.8",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.2.8",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.2.8",
|
||||
"@rspack/binding-linux-x64-gnu": "2.2.8",
|
||||
"@rspack/binding-linux-x64-musl": "2.2.8",
|
||||
"@rspack/binding-wasm32-wasi": "2.2.8",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.2.8",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.2.8",
|
||||
"@rspack/binding-win32-x64-msvc": "2.2.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-arm64": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.2.3.tgz",
|
||||
"integrity": "sha512-MGLx4lMTY6XEtJi55S+fk83+683GeUDuoqzjixbq6ehHdr/l6nGiHhgvMtV5DYt9sCytUDzyrCkcJ0AWqJxnTA==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.2.8.tgz",
|
||||
"integrity": "sha512-d6GuY/k7kJk7SOXmruIz0m+2fIXaLv2SnBHEYsbvBzE7ZO6QXq7fSABWFWNnSnNu+brYHA5Dr/skV81bXgTTCw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -206,9 +206,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-x64": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.2.3.tgz",
|
||||
"integrity": "sha512-5B/c1YTYEz9m7TyqtGQgTmXMr9PoPewyqsyHB4N0AB7nxDhtgmki0GniP2Lqtx3LJzOvQMjwet+I2lmWxvxwCg==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.2.8.tgz",
|
||||
"integrity": "sha512-xCVou/jJASjEAjwy1T3hPJcJqA5QZASJfUwHqEk+nA0v44MagwH8tM8lsOvRfhzR7N2+YFac1rfZOUT8uM3awg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -220,9 +220,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.2.3.tgz",
|
||||
"integrity": "sha512-sU+jPGD2xz3BxFvsdBQVGce538YHqrSKMB4ZSfKhj6RSKjeGzpJ1BVl8+IndiQsfTgaUxi7N+r5cs/ezGy1TVQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.2.8.tgz",
|
||||
"integrity": "sha512-Zy/ss6YAQTjOWKDkcWrbKtu+pySltqT22wn68nlrWKygPWLNmMdU5anlsnwRTIuQ3MF0YJRS42ARauVtlqvRQw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -237,9 +237,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.2.3.tgz",
|
||||
"integrity": "sha512-EQuADbqWbVgNAh5ep/u/B7Z/8UUkZjMLzHAOKZJklBpe4Y8mnhFNjieX0xc9NadR+drj9tqmEANxzTOkFtVPyQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.2.8.tgz",
|
||||
"integrity": "sha512-lxgp5O8PhL3St9p82llHoNoeWzp9jltW5S9F00p00XPJZHUIuxbwfLSzn/6Wg86USEmafLoBkyD9CM8rBd3SNQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -254,9 +254,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-ppc64-gnu": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.2.3.tgz",
|
||||
"integrity": "sha512-kyXROzr519a5juBII9ysuc5ZD2apEZ0DJqL5PPCAOVHjzMfThEIBwnX3gicNCmp+kY0CCIOl2LagwbtFaOzoiA==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.2.8.tgz",
|
||||
"integrity": "sha512-MY+YqpT02tcDCMgHy+IewQsaz7ql4mbJaAqqMlTIqvQwAUl9dXEP7BL352OgCxm9VRebTldE5lK99A3wVd3zqA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -271,9 +271,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-gnu": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.2.3.tgz",
|
||||
"integrity": "sha512-F3x6Nu0RUSoLtiaMse3hYQ3Nf5A2de6vTWWDXj14Ll6BpGWXGn+U/eXT/nB199fFnDEYf+CJEa7d6fzcYdwdjA==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.2.8.tgz",
|
||||
"integrity": "sha512-wmN9OigSGNGCKY+AOYaWI8LJcIi8qvs5KjueBueCKOnTV6MPIEujA75QZH1pehTTYKvdGv7r2EtUXUmWpn7/SQ==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -288,9 +288,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-musl": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.2.3.tgz",
|
||||
"integrity": "sha512-O3HK7OnPvoBxZu4MX2j+t3gk4qiUsFYqj/29L3WgU1iQsdUSIN6PInW2JvbiLqyuzt09VltIEXTKayY8EysCpQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.2.8.tgz",
|
||||
"integrity": "sha512-ZcQMYR10hLh581zs9MFnFFn0F7wyt5fkDffyukeMHJEoPJrbkfl6cQtsUdpQnZ+mYGYS5KydD1DT9/eMH65jjw==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -305,9 +305,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-s390x-gnu": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.2.3.tgz",
|
||||
"integrity": "sha512-SIxfGdwBdAjwJ8pDlPTb8MPIZIv/i2lKHn4/ywuDpFOxlUA4Bo/OKqQOenHx2MFD2mN8jigBZQTF0KVe5YP1uQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.2.8.tgz",
|
||||
"integrity": "sha512-ahBiE+Ir1FMYvStYicihhSJlS2YRagxtry0jWH8zW287o7C0eiHJ+pteJHHC15T5RJqm0j6w5TuwYe+F9AYxxg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -322,9 +322,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.2.3.tgz",
|
||||
"integrity": "sha512-IzQGcw09WYn/IzwB1SQpg7FQ211MBr+fJB2/WoRrPS6CNdtlkDHZaI8z2oq+2Oc5Su21jgX75VlWFajirUx5Dw==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.2.8.tgz",
|
||||
"integrity": "sha512-dncEI515NoPXh3zzWk06Rb3mhSV76myiFKqXiJ8K4fVAe5x/RlweMhvPhHhm7RnIMeBld7BeStzOqj38XFsWGA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -339,9 +339,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.2.3.tgz",
|
||||
"integrity": "sha512-9OKSx2ickrR+PFal94XE6Hkj49AQ2HI3KuR9XeRkKOwSxjwrskV/Pn1wc2itDOHkm/QHP7k+MttsYb4FGuNIqw==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.2.8.tgz",
|
||||
"integrity": "sha512-pfFyU03PjD0GaQG8zOQOHwq51rrJZetXjTGpMmz7iA1hq/f9lChJsDWrC8/7VXeQLwBofLZlOODqe8OM8OBzgA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -356,9 +356,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.2.3.tgz",
|
||||
"integrity": "sha512-gici3jWJi0GDy9kbYh57LoA57H8A2EAD9cV2jFKp1YoJ2aX2U9lANh4L+xoKPTvVQYpRvleoA5jkAvyfeLQ5bw==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.2.8.tgz",
|
||||
"integrity": "sha512-3mOJuZTrF56jOh/GD9chLMJKbzPZ6Ty2OIML7+lLz0Yk2XS/xWRfLn85Dmnkb/O6UF65x7+p8VPAIZlBtLTclw==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
@@ -372,9 +372,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.2.3.tgz",
|
||||
"integrity": "sha512-1MG66kcuqAGFs9ewiBc+/NJSTQr1jHrkZ2nCVMyhukl1o8embmFZa3BCibYgBYs5P7FRc6Sa+CDXcrfDZOLInQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.2.8.tgz",
|
||||
"integrity": "sha512-Cu/RMZT/16s+67xhl6X1pswetL3GLSQl+LnugKRh08Ul21A/tR7vxC4g4aih4u9k5SXCAngxFUt8zAjKnHIBqA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -386,9 +386,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.2.3.tgz",
|
||||
"integrity": "sha512-CAigxxh9DYJmEwH9f6FRkSsmt0GhKVqKaFRVFFrF9WDL7gXP3hyE/h/cCeMdmlTzRt8Mht87AvnDX7PG3neMrA==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.2.8.tgz",
|
||||
"integrity": "sha512-H/erd6di8OapZhhM0raA/7XduPn9jusfLMeO1XF+AmF9WF3HzHgMjha1j+KwtPgQnaH69w6AhY+G2472VIwQmw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -400,9 +400,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.2.3.tgz",
|
||||
"integrity": "sha512-qa5Wc34a+Uux5foZ1Z+9fPQceVRbgTunaIulHezVF/ZxvqKO4DkAC7tFl53shB0YRVBAPg8R78MGd8cByfoxLQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.2.8.tgz",
|
||||
"integrity": "sha512-BziHSUlIQM0MliCqdcHuBXSkQGtPoHQTXJce7fsgnTAzQFgPeog92qTNezYI4IrQ7pQouyiVJ2HPieUbVPRKQQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -414,13 +414,13 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/core": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.2.3.tgz",
|
||||
"integrity": "sha512-VHejw+PDd5B5v6VduFyjLSTIFaHBMNGPMKw+Y0zjkMqjYhDD1hjLOBC5frRKjTWcfYdk+Q73auWPp9k/H9PfIQ==",
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.2.8.tgz",
|
||||
"integrity": "sha512-JugsVrnbMGNYzMH++7gR9enygpP/lAo9PbVRq3XmJg0ryIvCpST0XJjBcccaSjYaaPamsjrddihmgVLMFp+yXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/binding": "2.2.3"
|
||||
"@rspack/binding": "2.2.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
@@ -455,17 +455,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/core": {
|
||||
"version": "2.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.21.tgz",
|
||||
"integrity": "sha512-QxhVqhHhN4guA24MlvlsFTb96pE/X8gBd5RBfp4j1kn5tAu1nJ7A9itKcRAuEw0WYJHcsWtI+WUnd7JPioHtlw==",
|
||||
"version": "2.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.23.tgz",
|
||||
"integrity": "sha512-two8zdTxN9iJBSyiFXwRLLDXz/yLY2+4ycz8wHjJYzeeuFi/EN2eqsKw1nSpY7sxEGIssY1X74c6017JJUBTyA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^3.1.1",
|
||||
"@mdx-js/react": "^3.1.1",
|
||||
"@rsbuild/core": "^2.1.13",
|
||||
"@rsbuild/core": "^2.2.10",
|
||||
"@rsbuild/plugin-react": "~2.1.0",
|
||||
"@rspress/shared": "2.0.21",
|
||||
"@rspress/shared": "2.0.23",
|
||||
"@shikijs/rehype": "^4.2.0",
|
||||
"@types/mdast": "^4.0.4",
|
||||
"@types/react": "^19.2.18",
|
||||
@@ -484,7 +484,7 @@
|
||||
"react-dom": "^19.2.8",
|
||||
"react-lazy-with-preload": "^2.2.1",
|
||||
"react-render-to-markdown": "19.1.0",
|
||||
"react-router-dom": "^7.18.2",
|
||||
"react-router-dom": "^7.18.4",
|
||||
"rehype-external-links": "^3.0.0",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"remark-cjk-friendly": "^2.3.1",
|
||||
@@ -508,9 +508,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/plugin-client-redirects": {
|
||||
"version": "2.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.21.tgz",
|
||||
"integrity": "sha512-21giX10Blom+dOJBJOxXZUS+pjez1Tb9iNA7L7km8uUkn5L45KfdQvYqbBHY6Nv6L46zaDdz0Mt97eAqBPgNoA==",
|
||||
"version": "2.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.23.tgz",
|
||||
"integrity": "sha512-TdpvO3TREv6s2mE32ztFvG3P232qUwjyQCKKsb9g0XT0q7rzcStZFRE7XT/L8i0XTzH/mfli1tVl4guTea/J3Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -521,9 +521,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/plugin-sitemap": {
|
||||
"version": "2.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.21.tgz",
|
||||
"integrity": "sha512-PldjjLDFqtQZ3yPHHsWxmxGNlmoNH7nSx76ww7QkPzkO9rPrlr71sBLZR3MMc1s6cd5Csyd+gHjfIJiP7o77XQ==",
|
||||
"version": "2.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.23.tgz",
|
||||
"integrity": "sha512-r37TvCP2wuQX8JbA7hHti8JXhVx4HiaJPn702NgFhGyolGJYIUTRQCO2/ixiP1FZJuxZ4c0yb4ZyNeDa9ZPMlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -534,13 +534,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspress/shared": {
|
||||
"version": "2.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.21.tgz",
|
||||
"integrity": "sha512-siCWkv1a4n6y7JdVRII+fwCRZGZtG5KGFfKi2w/Tt33UnIgh4XGqozZ5F/K0iZ/QUwg0wi93SoVdOQm2Q+wf8w==",
|
||||
"version": "2.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.23.tgz",
|
||||
"integrity": "sha512-kE2GXRCQ7GAl2wll1JBWRHEkZICKcWv3V86m8TkjiWb0eEdjACl3kns7j00KTq4UbE35kUPOs+0Lx8vGqK7q9w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rsbuild/core": "^2.1.13",
|
||||
"@rsbuild/core": "^2.2.10",
|
||||
"@shikijs/rehype": "^4.2.0",
|
||||
"@types/react": "^19.2.18",
|
||||
"mdast-util-mdx-jsx": "^3.2.0",
|
||||
@@ -3288,9 +3288,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "7.18.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.3.tgz",
|
||||
"integrity": "sha512-gyXgtdr5uACJ5b1Q4udzjVV+tb/rlHIMJKuJ0e89R4Kzgz47z/rgP0dIKxktqIEUhDHluGTPJJH/wRha7CyqsA==",
|
||||
"version": "7.18.4",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.4.tgz",
|
||||
"integrity": "sha512-PUPQcMhMGRAslLcvtlPz/kmzBEWPhLdgLFrL7pLNepBL6dX0lWj4WD2cUYVgYCuT3jxvghYFg81cDTj44DhetQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3311,13 +3311,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "7.18.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.3.tgz",
|
||||
"integrity": "sha512-ytVbyBBM7vMfRCam25r0WMhSVSom909A8p+8m0/f1w853dz/xfFu6etAT2SEbVoSnI+ZoPRDqIsQXVT89gp7kg==",
|
||||
"version": "7.18.4",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.4.tgz",
|
||||
"integrity": "sha512-yrfmJHIpDG7taCpqKjT1G5B6q3O2K+RN8/fgNf0lTjCwiPbQ0ei6vXX9ZjQR+7ld8Tr7Z5xmyMnZ8YJrphWQUw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"react-router": "7.18.3"
|
||||
"react-router": "7.18.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This document provides information about downloading and deploying the Debian package. You can also use this guide for other deb-based distributions such as Ubuntu.
|
||||
|
||||
### Installation
|
||||
## Installation
|
||||
|
||||
To add the Continuwuation apt repository:
|
||||
```bash
|
||||
@@ -26,16 +26,20 @@ The `continuwuity` package conflicts with the old `conduwuit` package and will r
|
||||
|
||||
See the [generic deployment guide](/deploying/generic.mdx) for additional information about using the Debian package.
|
||||
|
||||
### Configuration
|
||||
## Configuration
|
||||
|
||||
After installation, Continuwuity places the example configuration at `/etc/conduwuit/conduwuit.toml` as the default configuration file. The configuration file indicates which settings you must change before starting the service.
|
||||
|
||||
You can customize additional settings by uncommenting and modifying the configuration options in `/etc/conduwuit/conduwuit.toml`.
|
||||
|
||||
### Running
|
||||
## Running
|
||||
|
||||
The package uses the `conduwuit.service` systemd unit file to start and stop Continuwuity. The binary installs at `/usr/bin/conduwuit`.
|
||||
|
||||
By default, this package assumes that Continuwuity runs behind a reverse proxy. The default configuration options apply (listening on `localhost` and TCP port `6167`). Matrix federation requires a valid domain name and TLS. To federate properly, you must set up TLS certificates and certificate renewal.
|
||||
|
||||
For information about setting up a reverse proxy and TLS, consult online documentation and guides. The [generic deployment guide](/deploying/generic.md#setting-up-the-reverse-proxy) documents Caddy, which is the most user-friendly option for reverse proxy configuration.
|
||||
|
||||
## What's next?
|
||||
|
||||
Navigate to [Post-installation](/deploying#post-installation) for next steps.
|
||||
+24
-8
@@ -11,9 +11,15 @@ export default defineConfig({
|
||||
light: '/assets/logo.svg',
|
||||
dark: '/assets/logo.svg',
|
||||
},
|
||||
// Use `.no-zoom` class to disable image zooms
|
||||
mediumZoom: {
|
||||
selector: '.rspress-doc :not(.no-zoom *) > img',
|
||||
},
|
||||
markdown: {
|
||||
link: {
|
||||
checkDeadLinks: {
|
||||
// exclude files in the `docs/public` folder from dead link checking
|
||||
// (they are linked to without the `/public` prefix)
|
||||
excludes: [
|
||||
'/deploying/docker-compose.with-caddy.yml',
|
||||
'/deploying/docker-compose.with-caddy-labels.yml',
|
||||
@@ -26,7 +32,10 @@ export default defineConfig({
|
||||
'/advanced/delegated.docker-compose.for-traefik.yml',
|
||||
'/advanced/delegated.docker-compose.with-traefik.yml',
|
||||
'/calls/livekit.docker-compose.with-caddy-labels.yml',
|
||||
'/calls/livekit.nginx.conf'
|
||||
'/calls/livekit.nginx.conf',
|
||||
'/guides/grafana-dashboard.json',
|
||||
'/guides/push-notifications.excalidraw',
|
||||
'CONTRIBUTING.md'
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -52,6 +61,13 @@ export default defineConfig({
|
||||
mode: 'link',
|
||||
content: 'https://github.com/continuwuity/continuwuity',
|
||||
},
|
||||
{
|
||||
icon: {
|
||||
svg: `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Open Collective</title><path fill="currentColor" d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12c2.54 0 4.894-.79 6.834-2.135l-3.107-3.109a7.715 7.715 0 1 1 0-13.512l3.107-3.109A11.943 11.943 0 0 0 12 0zm9.865 5.166l-3.109 3.107A7.67 7.67 0 0 1 19.715 12a7.682 7.682 0 0 1-.959 3.727l3.109 3.107A11.943 11.943 0 0 0 24 12c0-2.54-.79-4.894-2.135-6.834z"/></svg>`
|
||||
},
|
||||
mode: 'link',
|
||||
content: 'https://opencollective.com/continuwuity',
|
||||
},
|
||||
],
|
||||
lastUpdated: true,
|
||||
enableContentAnimation: true,
|
||||
@@ -65,16 +81,13 @@ export default defineConfig({
|
||||
}),
|
||||
pluginClientRedirects({
|
||||
redirects: [{
|
||||
from: '/configuration/examples',
|
||||
from: '^/config_reference$',
|
||||
to: '/reference/config'
|
||||
}, {
|
||||
from: '/admin_reference',
|
||||
from: '^/admin_reference$',
|
||||
to: '/reference/admin'
|
||||
}, {
|
||||
from: '/server_reference',
|
||||
to: '/reference/server'
|
||||
}, {
|
||||
from: '/community$',
|
||||
from: '^/community$',
|
||||
to: '/community/guidelines'
|
||||
}, {
|
||||
from: "^/turn$",
|
||||
@@ -83,11 +96,14 @@ export default defineConfig({
|
||||
from: "^/livekit$",
|
||||
to: "/calls/livekit",
|
||||
}, {
|
||||
from: "^/dns",
|
||||
from: "^/dns$",
|
||||
to: "/guides/dns",
|
||||
}, {
|
||||
from: "^/source(|_code)$",
|
||||
to: "https://forgejo.ellis.link/continuwuation/continuwuity",
|
||||
}, {
|
||||
from: "^/(CONTRIBUTING.md|contributing)$",
|
||||
to: "/development/contributing"
|
||||
}
|
||||
]
|
||||
})],
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
[toolchain]
|
||||
profile = "minimal"
|
||||
channel = "1.98.1"
|
||||
channel = "1.99.1"
|
||||
components = [
|
||||
# For rust-analyzer
|
||||
"rust-src",
|
||||
|
||||
+37
-70
@@ -8,13 +8,15 @@ use std::{
|
||||
use conduwuit::{
|
||||
Err, Result, at, debug_error, err, info,
|
||||
matrix::{
|
||||
Event,
|
||||
Event, StateKey,
|
||||
pdu::{PduEvent, PduId, RawPduId},
|
||||
},
|
||||
state_res::EventTypeExt,
|
||||
trace, utils,
|
||||
utils::{
|
||||
stream::{IterStream, ReadyExt},
|
||||
string::EMPTY,
|
||||
to_canonical_object,
|
||||
},
|
||||
warn,
|
||||
};
|
||||
@@ -27,7 +29,9 @@ use resolvematrix::{
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId,
|
||||
OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId, UInt,
|
||||
api::federation::event::get_room_state, events::AnyStateEvent, serde::Raw,
|
||||
api::federation::event::get_room_state,
|
||||
events::{AnyStateEvent, StateEventType},
|
||||
serde::Raw,
|
||||
};
|
||||
use service::rooms::{
|
||||
short::{ShortEventId, ShortRoomId},
|
||||
@@ -533,19 +537,36 @@ impl crate::Context<'_> {
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
let pdus: Vec<CanonicalJsonObject> = state_ids
|
||||
let mut pdus: HashMap<(StateEventType, StateKey), CanonicalJsonObject> = state_ids
|
||||
.iter()
|
||||
.try_stream()
|
||||
.and_then(|id| self.services.rooms.timeline.get_pdu_json(id))
|
||||
.try_stream::<conduwuit::Error>()
|
||||
.and_then(|id| async {
|
||||
let pdu_json = self.services.rooms.timeline.get_pdu_json(id).await?;
|
||||
let event_type = pdu_json
|
||||
.get("type")
|
||||
.and_then(CanonicalJsonValue::as_str)
|
||||
.expect("event type must be present in events");
|
||||
let state_key = pdu_json
|
||||
.get("state_key")
|
||||
.and_then(CanonicalJsonValue::as_str)
|
||||
.expect("state keys must be present for events in the room state");
|
||||
Ok(((event_type.into(), state_key.into()), pdu_json))
|
||||
})
|
||||
.try_collect()
|
||||
.await?;
|
||||
|
||||
let json = serde_json::to_string_pretty(&pdus).map_err(|e| {
|
||||
err!(Database(
|
||||
"Failed to convert room state events to pretty JSON, possible invalid room \
|
||||
state events in our database {e}",
|
||||
))
|
||||
})?;
|
||||
let pdu = self.services.rooms.timeline.get_pdu(&event_id).await?;
|
||||
if let Some(state_key) = pdu.state_key() {
|
||||
pdus.insert(pdu.kind().with_state_key(state_key), to_canonical_object(pdu)?);
|
||||
}
|
||||
|
||||
let json =
|
||||
serde_json::to_string_pretty(&pdus.values().collect::<Vec<_>>()).map_err(|e| {
|
||||
err!(Database(
|
||||
"Failed to convert room state events to pretty JSON, possible invalid room \
|
||||
state events in our database {e}",
|
||||
))
|
||||
})?;
|
||||
|
||||
let out = format!("```json\n{json}\n```");
|
||||
self.write_str(&out).await
|
||||
@@ -694,11 +715,11 @@ impl crate::Context<'_> {
|
||||
| Ok(value) => match self
|
||||
.services
|
||||
.server_keys
|
||||
.verify_json(&value, &room_version_rules)
|
||||
.verify_event_json(&value, &room_version_rules)
|
||||
.await
|
||||
{
|
||||
| Err(e) => return Err!("Signature verification failed: {e}"),
|
||||
| Ok(()) => write!(self, "Signature correct"),
|
||||
| Ok(_) => write!(self, "Signature correct"),
|
||||
},
|
||||
}
|
||||
.await
|
||||
@@ -714,7 +735,7 @@ impl crate::Context<'_> {
|
||||
let msg = match self
|
||||
.services
|
||||
.server_keys
|
||||
.verify_event(&event, &room_version_rules)
|
||||
.verify_event_json(&event, &room_version_rules)
|
||||
.await
|
||||
{
|
||||
| Err(e) => return Err(e),
|
||||
@@ -849,7 +870,7 @@ impl crate::Context<'_> {
|
||||
for result in remote_state_response.pdus.iter().map(|pdu| {
|
||||
self.services
|
||||
.server_keys
|
||||
.validate_and_add_event_id(pdu, &room_version_rules)
|
||||
.verify_event_json_no_fetch_add_event_id(pdu, &room_version_rules)
|
||||
}) {
|
||||
let Ok((event_id, value)) = result.await else {
|
||||
continue;
|
||||
@@ -887,7 +908,7 @@ impl crate::Context<'_> {
|
||||
for result in remote_state_response.auth_chain.iter().map(|pdu| {
|
||||
self.services
|
||||
.server_keys
|
||||
.validate_and_add_event_id(pdu, &room_version_rules)
|
||||
.verify_event_json_no_fetch_add_event_id(pdu, &room_version_rules)
|
||||
}) {
|
||||
let Ok((event_id, value)) = result.await else {
|
||||
continue;
|
||||
@@ -943,60 +964,6 @@ impl crate::Context<'_> {
|
||||
.await
|
||||
}
|
||||
|
||||
pub(super) async fn get_signing_keys(
|
||||
&self,
|
||||
server_name: Option<OwnedServerName>,
|
||||
notary: Option<OwnedServerName>,
|
||||
query: bool,
|
||||
) -> Result {
|
||||
let server_name = server_name.unwrap_or_else(|| self.services.server.name.clone());
|
||||
|
||||
if let Some(notary) = notary {
|
||||
let signing_keys = self
|
||||
.services
|
||||
.server_keys
|
||||
.notary_request(¬ary, &server_name)
|
||||
.await?;
|
||||
|
||||
let out = format!("```rs\n{signing_keys:#?}\n```");
|
||||
return self.write_str(&out).await;
|
||||
}
|
||||
|
||||
let signing_keys = if query {
|
||||
self.services
|
||||
.server_keys
|
||||
.server_request(&server_name)
|
||||
.await?
|
||||
} else {
|
||||
self.services
|
||||
.server_keys
|
||||
.signing_keys_for(&server_name)
|
||||
.await?
|
||||
};
|
||||
|
||||
let out = format!("```rs\n{signing_keys:#?}\n```");
|
||||
self.write_str(&out).await
|
||||
}
|
||||
|
||||
pub(super) async fn get_verify_keys(&self, server_name: Option<OwnedServerName>) -> Result {
|
||||
let server_name = server_name.unwrap_or_else(|| self.services.server.name.clone());
|
||||
|
||||
let keys = self
|
||||
.services
|
||||
.server_keys
|
||||
.verify_keys_for(&server_name)
|
||||
.await;
|
||||
|
||||
let mut out = String::new();
|
||||
writeln!(out, "| Key ID | Public Key |")?;
|
||||
writeln!(out, "| --- | --- |")?;
|
||||
for (key_id, key) in keys {
|
||||
writeln!(out, "| {key_id} | {key:?} |")?;
|
||||
}
|
||||
|
||||
self.write_str(&out).await
|
||||
}
|
||||
|
||||
pub(super) async fn resolve_true_destination(
|
||||
&self,
|
||||
server_name: OwnedServerName,
|
||||
|
||||
@@ -103,22 +103,6 @@ pub enum DebugCommand {
|
||||
event_id: OwnedEventId,
|
||||
},
|
||||
|
||||
/// Get and display signing keys from local cache or remote server.
|
||||
GetSigningKeys {
|
||||
server_name: Option<OwnedServerName>,
|
||||
|
||||
#[arg(long)]
|
||||
notary: Option<OwnedServerName>,
|
||||
|
||||
#[arg(short, long)]
|
||||
query: bool,
|
||||
},
|
||||
|
||||
/// Get and display signing keys from local cache or remote server.
|
||||
GetVerifyKeys {
|
||||
server_name: Option<OwnedServerName>,
|
||||
},
|
||||
|
||||
/// Sends a federation request to the remote server's
|
||||
/// `/_matrix/federation/v1/version` endpoint and measures the latency it
|
||||
/// took for the server to respond
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::fmt::Write;
|
||||
|
||||
use conduwuit::{Err, Result, utils::response::LimitReadExt};
|
||||
use futures::StreamExt;
|
||||
use ruma::{OwnedRoomId, OwnedServerName, OwnedUserId};
|
||||
use ruma::{MilliSecondsSinceUnixEpoch, OwnedRoomId, OwnedServerName, OwnedUserId};
|
||||
|
||||
use crate::get_room_info;
|
||||
|
||||
@@ -131,4 +131,30 @@ impl crate::Context<'_> {
|
||||
self.write_str(&format!("Rooms {user_id} shares with us ({num}):\n```\n{body}\n```"))
|
||||
.await
|
||||
}
|
||||
|
||||
pub(super) async fn get_signing_keys(&self, server_name: OwnedServerName) -> Result {
|
||||
let response = self
|
||||
.services
|
||||
.server_keys
|
||||
.origin_request(server_name, MilliSecondsSinceUnixEpoch::now())
|
||||
.await?;
|
||||
self.write_str("| Key ID | Public Key | Expired (unix milliseconds) |\n")
|
||||
.await?;
|
||||
self.write_str("| ------ | ---------- | --------------------------- |\n")
|
||||
.await?;
|
||||
for (key_id, key) in &response.verify_keys {
|
||||
self.write_str(&format!("| {key_id} | {} | |\n", key.key))
|
||||
.await?;
|
||||
}
|
||||
for (key_id, old_key) in &response.old_verify_keys {
|
||||
self.write_str(&format!(
|
||||
"| {key_id} | {} | {:0<13} |\n",
|
||||
old_key.key,
|
||||
old_key.expired_ts.get().to_string()
|
||||
))
|
||||
.await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -39,4 +39,9 @@ pub enum FederationCommand {
|
||||
RemoteUserInRooms {
|
||||
user_id: OwnedUserId,
|
||||
},
|
||||
|
||||
/// Queries the remote server for their current signing keys.
|
||||
GetSigningKeys {
|
||||
server_name: OwnedServerName,
|
||||
},
|
||||
}
|
||||
@@ -32,7 +32,6 @@ use crate::{admin, admin::AdminCommand, context::Context};
|
||||
#[must_use]
|
||||
pub(super) fn complete(line: &str) -> String { complete_command(AdminCommand::command(), line) }
|
||||
|
||||
#[must_use]
|
||||
pub(super) fn dispatch(services: Arc<Services>, command: CommandInput) -> ProcessorFuture {
|
||||
Box::pin(handle_command(services, command))
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use clap::Subcommand;
|
||||
use conduwuit::Result;
|
||||
use ruma::OwnedServerName;
|
||||
|
||||
use crate::Context;
|
||||
|
||||
@@ -12,12 +11,6 @@ pub enum GlobalsCommand {
|
||||
CurrentCount,
|
||||
|
||||
LastCheckForAnnouncementsId,
|
||||
|
||||
/// This returns an empty `Ok(BTreeMap<..>)` when there are no keys found
|
||||
/// for the server.
|
||||
SigningKeysFor {
|
||||
origin: OwnedServerName,
|
||||
},
|
||||
}
|
||||
|
||||
/// All the getters and iterators from src/database/key_value/globals.rs
|
||||
@@ -47,13 +40,6 @@ pub(super) async fn process(subcommand: GlobalsCommand, context: &Context<'_>) -
|
||||
.await;
|
||||
let query_time = timer.elapsed();
|
||||
|
||||
write!(context, "Query completed in {query_time:?}:\n\n```rs\n{results:#?}\n```")
|
||||
},
|
||||
| GlobalsCommand::SigningKeysFor { origin } => {
|
||||
let timer = tokio::time::Instant::now();
|
||||
let results = services.server_keys.verify_keys_for(&origin).await;
|
||||
let query_time = timer.elapsed();
|
||||
|
||||
write!(context, "Query completed in {query_time:?}:\n\n```rs\n{results:#?}\n```")
|
||||
},
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ impl crate::Context<'_> {
|
||||
},
|
||||
};
|
||||
|
||||
room_ids.push(room_id.clone());
|
||||
room_ids.push(room_id);
|
||||
}
|
||||
|
||||
if room_alias_or_id.is_room_alias_id() {
|
||||
|
||||
@@ -4,6 +4,9 @@ use service::registration_tokens::TokenExpires;
|
||||
|
||||
impl crate::Context<'_> {
|
||||
pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result {
|
||||
if !self.services.config.allow_registration {
|
||||
return Err!("Registration has been disabled on this homeserver.");
|
||||
}
|
||||
let expires = {
|
||||
if expires.immortal {
|
||||
None
|
||||
|
||||
@@ -31,14 +31,36 @@ const AUTO_GEN_PASSWORD_LENGTH: usize = 25;
|
||||
const BULK_JOIN_REASON: &str = "Bulk force joining this room as initiated by the server admin.";
|
||||
|
||||
impl crate::Context<'_> {
|
||||
pub(super) async fn list_users(&self) -> Result {
|
||||
let users: Vec<_> = self
|
||||
.services
|
||||
.users
|
||||
.stream_local_users()
|
||||
.map(|id| id.as_str().to_owned())
|
||||
.collect()
|
||||
.await;
|
||||
pub(super) async fn list_users(
|
||||
&self,
|
||||
show_deactivated: bool,
|
||||
hide_suspended: bool,
|
||||
hide_locked: bool,
|
||||
) -> Result {
|
||||
let mut users: Vec<String> = Vec::new();
|
||||
let mut user_stream = self.services.users.stream_local_users();
|
||||
while let Some(id) = user_stream.next().await {
|
||||
if !show_deactivated {
|
||||
if matches!(self.services.users.status(&id).await, AccountStatus::Deactivated) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
let suspended = match self.services.users.is_suspended(&id).await {
|
||||
| Err(_) => continue,
|
||||
| Ok(suspended) => suspended,
|
||||
};
|
||||
if hide_suspended && suspended {
|
||||
continue;
|
||||
}
|
||||
let locked = match self.services.users.is_locked(&id).await {
|
||||
| Err(_) => continue,
|
||||
| Ok(locked) => locked,
|
||||
};
|
||||
if hide_locked && locked {
|
||||
continue;
|
||||
}
|
||||
users.push(id.as_str().to_owned());
|
||||
}
|
||||
|
||||
let mut plain_msg = format!("Found {} local user account(s):\n```\n", users.len());
|
||||
plain_msg += users.join("\n").as_str();
|
||||
@@ -1083,6 +1105,9 @@ impl crate::Context<'_> {
|
||||
|
||||
pub(super) async fn change_email(&self, user_id: String, email: Option<String>) -> Result {
|
||||
let user_id = parse_local_user_id(self.services, &user_id)?;
|
||||
if matches!(self.services.users.status(&user_id).await, AccountStatus::NotFound) {
|
||||
return Err!("This account does not exist.");
|
||||
}
|
||||
let Ok(new_email) = email.map(Address::try_from).transpose() else {
|
||||
return Err!("Invalid email address.");
|
||||
};
|
||||
|
||||
+11
-1
@@ -164,7 +164,17 @@ pub enum UserCommand {
|
||||
|
||||
/// List local users in the database
|
||||
#[command(name = "list", alias = "list-users")]
|
||||
ListUsers,
|
||||
ListUsers {
|
||||
// Include deactivated users in the user list
|
||||
#[arg(long)]
|
||||
show_deactivated: bool,
|
||||
// Hide suspended accounts from the user list
|
||||
#[arg(long)]
|
||||
hide_suspended: bool,
|
||||
// Hide locked accounts from the user list
|
||||
#[arg(long)]
|
||||
hide_locked: bool,
|
||||
},
|
||||
|
||||
/// Lists all the rooms (local and remote) that the specified user is
|
||||
/// invited to
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Result, Server};
|
||||
use ruma::{
|
||||
RoomVersionId,
|
||||
api::client::discovery::get_capabilities::{
|
||||
self,
|
||||
v3::{
|
||||
Capabilities, GetLoginTokenCapability, ProfileFieldsCapability, RoomVersionStability,
|
||||
RoomVersionsCapability, ThirdPartyIdChangesCapability,
|
||||
api::{
|
||||
OAuthClientScope,
|
||||
client::discovery::get_capabilities::{
|
||||
self,
|
||||
v3::{
|
||||
AdminCapability, Capabilities, GetLoginTokenCapability, ProfileFieldsCapability,
|
||||
RoomVersionStability, RoomVersionsCapability, ThirdPartyIdChangesCapability,
|
||||
},
|
||||
},
|
||||
},
|
||||
assign,
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
@@ -24,6 +28,8 @@ pub(crate) async fn get_capabilities_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_capabilities::v3::Request>,
|
||||
) -> Result<get_capabilities::v3::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
let available: BTreeMap<RoomVersionId, RoomVersionStability> =
|
||||
Server::available_room_versions().collect();
|
||||
|
||||
@@ -42,18 +48,22 @@ pub(crate) async fn get_capabilities_route(
|
||||
|
||||
capabilities.forget_forced_upon_leave.enabled = true;
|
||||
|
||||
if services
|
||||
.users
|
||||
.is_admin(body.identity.expect_sender_user()?)
|
||||
.await
|
||||
{
|
||||
if services.users.is_admin(sender_user).await {
|
||||
capabilities.account_moderation.lock = true;
|
||||
capabilities.account_moderation.suspend = true;
|
||||
|
||||
capabilities.admin =
|
||||
AdminCapability::new(BTreeSet::from_iter([OAuthClientScope::ServerAdministration]));
|
||||
}
|
||||
|
||||
capabilities.profile_fields = Some(
|
||||
assign!(ProfileFieldsCapability::new(true), { disallowed: Some(services.oidc.restricted_profile_fields()) }),
|
||||
);
|
||||
|
||||
capabilities.set(
|
||||
"org.matrix.msc4174.webpush",
|
||||
json!({ "enabled": true, "vapid": services.pusher.webpush_vapid_public_key() }),
|
||||
)?;
|
||||
|
||||
Ok(get_capabilities::v3::Response::new(capabilities))
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Event, Result, at, debug_warn, err, ref_at,
|
||||
result::LogErr,
|
||||
utils::{
|
||||
IterStream,
|
||||
future::TryExtExt,
|
||||
@@ -98,7 +99,12 @@ pub(crate) async fn get_context_route(
|
||||
.pdus_rev(room_id, Some(base_count))
|
||||
.ignore_err()
|
||||
.then(async |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
if let Err(e) = services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
@@ -121,7 +127,12 @@ pub(crate) async fn get_context_route(
|
||||
.pdus(room_id, Some(base_count))
|
||||
.ignore_err()
|
||||
.then(async |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
if let Err(e) = services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
|
||||
@@ -267,11 +267,19 @@ pub(crate) async fn get_public_rooms_filtered_helper(
|
||||
summary.into()
|
||||
})
|
||||
.ready_filter_map(|chunk: PublicRoomsChunk| {
|
||||
if !filter.room_types.is_empty() && !filter.room_types.contains(&RoomTypeFilter::from(chunk.room_type.clone())) {
|
||||
if !filter.room_types.is_empty()
|
||||
&& !filter
|
||||
.room_types
|
||||
.contains(&RoomTypeFilter::from(chunk.room_type.clone()))
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
if let Some(query) = filter.generic_search_term.as_ref().map(|q| q.to_lowercase()) {
|
||||
if let Some(query) = filter
|
||||
.generic_search_term
|
||||
.as_ref()
|
||||
.map(|q| q.to_lowercase())
|
||||
{
|
||||
if let Some(name) = &chunk.name {
|
||||
if name.to_lowercase().contains(&query) {
|
||||
return Some(chunk);
|
||||
|
||||
@@ -2,6 +2,7 @@ use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Result, debug_error, err, info,
|
||||
matrix::{event::gen_event_id_canonical_json, pdu::PartialPdu},
|
||||
metrics::KeyValue,
|
||||
trace, warn,
|
||||
};
|
||||
use futures::FutureExt;
|
||||
@@ -113,6 +114,31 @@ pub(crate) async fn invite_helper(
|
||||
room_id: &RoomId,
|
||||
reason: Option<String>,
|
||||
is_direct: bool,
|
||||
) -> Result {
|
||||
let result =
|
||||
send_invite(services, sender_user, recipient_user, room_id, reason, is_direct).await;
|
||||
|
||||
let destination = if services.globals.user_is_local(recipient_user) {
|
||||
"local"
|
||||
} else {
|
||||
"remote"
|
||||
};
|
||||
services.server.metrics.instruments.invites.add(1, &[
|
||||
KeyValue::new("direction", "outgoing"),
|
||||
KeyValue::new("destination", destination),
|
||||
KeyValue::new("outcome", if result.is_ok() { "success" } else { "failure" }),
|
||||
]);
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
async fn send_invite(
|
||||
services: &Services,
|
||||
sender_user: &UserId,
|
||||
recipient_user: &UserId,
|
||||
room_id: &RoomId,
|
||||
reason: Option<String>,
|
||||
is_direct: bool,
|
||||
) -> Result {
|
||||
if !services.users.is_admin(sender_user).await && services.config.block_non_admin_invites {
|
||||
info!(
|
||||
|
||||
@@ -140,7 +140,12 @@ pub(crate) async fn get_message_events_route(
|
||||
.wide_filter_map(|item| visibility_filter(&services, item, sender_user))
|
||||
.take(limit)
|
||||
.then(async |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
if let Err(e) = services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
@@ -375,5 +380,6 @@ pub(crate) async fn is_ignored_invite(
|
||||
services
|
||||
.users
|
||||
.invite_filter_level(&sender_user, recipient_user)
|
||||
.await == FilterLevel::Ignore
|
||||
.await
|
||||
== FilterLevel::Ignore
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{OwnedRoomId, api::client::membership::mutual_rooms};
|
||||
use ruma::{OwnedRoomId, api::client::membership::get_mutual_rooms};
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
@@ -13,8 +13,8 @@ use crate::Ruma;
|
||||
#[tracing::instrument(skip_all, name = "mutual_rooms", level = "info")]
|
||||
pub(crate) async fn get_mutual_rooms_unstable_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<mutual_rooms::unstable::Request>,
|
||||
) -> Result<mutual_rooms::unstable::Response> {
|
||||
body: Ruma<get_mutual_rooms::unstable::Request>,
|
||||
) -> Result<get_mutual_rooms::unstable::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
if sender_user == body.user_id {
|
||||
@@ -28,7 +28,7 @@ pub(crate) async fn get_mutual_rooms_unstable_route(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
Ok(mutual_rooms::unstable::Response::new(mutual_rooms))
|
||||
Ok(get_mutual_rooms::unstable::Response::new(mutual_rooms))
|
||||
}
|
||||
|
||||
/// # `GET /_matrix/client/v1/mutual_rooms`
|
||||
@@ -37,8 +37,8 @@ pub(crate) async fn get_mutual_rooms_unstable_route(
|
||||
#[tracing::instrument(skip_all, name = "mutual_rooms", level = "info")]
|
||||
pub(crate) async fn get_mutual_rooms_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<mutual_rooms::v1::Request>,
|
||||
) -> Result<mutual_rooms::v1::Response> {
|
||||
body: Ruma<get_mutual_rooms::v1::Request>,
|
||||
) -> Result<get_mutual_rooms::v1::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
if sender_user == body.user_id {
|
||||
@@ -52,7 +52,7 @@ pub(crate) async fn get_mutual_rooms_route(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
Ok(mutual_rooms::v1::Response::new(
|
||||
Ok(get_mutual_rooms::v1::Response::new(
|
||||
mutual_rooms
|
||||
.len()
|
||||
.try_into()
|
||||
|
||||
@@ -55,5 +55,8 @@ fn oauth_router() -> Router<crate::State> {
|
||||
.route(concat!("/", JWKS_URI_PATH), get(async || Json(json!({"keys": []}))))
|
||||
.route(concat!("/", TOKEN_PATH), post(token::token_route))
|
||||
.route(concat!("/", TOKEN_REVOKE_PATH), post(token::revoke_token_route))
|
||||
.route(concat!("/", DEVICE_AUTHORIZATION_PATH), post(device::device_authorization_route))
|
||||
.route(
|
||||
concat!("/", DEVICE_AUTHORIZATION_PATH),
|
||||
post(device::device_authorization_route),
|
||||
)
|
||||
}
|
||||
@@ -29,6 +29,12 @@ pub(crate) async fn get_profile_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_profile::v3::Request>,
|
||||
) -> Result<get_profile::v3::Response> {
|
||||
if services.config.require_auth_for_profile_requests && body.identity.is_none() {
|
||||
return Err!(Request(Unauthorized(
|
||||
"This server requires authentication to access user profiles."
|
||||
)));
|
||||
}
|
||||
|
||||
let Some(profile) = fetch_full_profile(&services, &body.user_id).await else {
|
||||
return Err!(Request(NotFound("This user's profile could not be fetched.")));
|
||||
};
|
||||
@@ -40,6 +46,12 @@ pub(crate) async fn get_profile_field_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_profile_field::v3::Request>,
|
||||
) -> Result<get_profile_field::v3::Response> {
|
||||
if services.config.require_auth_for_profile_requests && body.identity.is_none() {
|
||||
return Err!(Request(Unauthorized(
|
||||
"This server requires authentication to access user profiles."
|
||||
)));
|
||||
}
|
||||
|
||||
let value = fetch_profile_field(&services, &body.user_id, body.field.clone()).await?;
|
||||
|
||||
Ok(assign!(get_profile_field::v3::Response::default(), { value }))
|
||||
|
||||
+77
-8
@@ -1,13 +1,16 @@
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Error, Result, err};
|
||||
use conduwuit_service::Services;
|
||||
use conduwuit::{Err, Error, Result, err, utils::IterStream};
|
||||
use conduwuit_service::{Services, pusher::ActivationOutcome};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue,
|
||||
api::{
|
||||
client::push::{
|
||||
delete_pushrule, get_pushers, get_pushrule, get_pushrule_actions,
|
||||
get_pushrule_enabled, get_pushrules_all, get_pushrules_global_scope, set_pusher,
|
||||
set_pushrule, set_pushrule_actions, set_pushrule_enabled,
|
||||
delete_pushrule, get_pushrule, get_pushrule_actions, get_pushrule_enabled,
|
||||
get_pushrules_all, get_pushrules_global_scope, set_pushrule, set_pushrule_actions,
|
||||
set_pushrule_enabled,
|
||||
},
|
||||
error::ErrorKind,
|
||||
},
|
||||
@@ -20,6 +23,12 @@ use ruma::{
|
||||
RemovePushRuleError, Ruleset,
|
||||
},
|
||||
};
|
||||
use ruminuwuity::pushers::{
|
||||
PusherKind,
|
||||
ack::unstable as pushers_ack,
|
||||
get_pushers::{self, v3::PusherWithActivation},
|
||||
set_pusher,
|
||||
};
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
@@ -460,7 +469,29 @@ pub(crate) async fn get_pushers_route(
|
||||
) -> Result<get_pushers::v3::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
Ok(get_pushers::v3::Response::new(services.pusher.get_pushers(sender_user).await))
|
||||
let pushers = services
|
||||
.pusher
|
||||
.get_pushers(sender_user)
|
||||
.await
|
||||
.into_iter()
|
||||
.stream()
|
||||
.then(async |pusher| {
|
||||
let activated = match pusher.kind {
|
||||
| PusherKind::WebPush(_) => Some(
|
||||
services
|
||||
.pusher
|
||||
.is_webpush_activated(sender_user, pusher.ids.pushkey.as_str())
|
||||
.await,
|
||||
),
|
||||
| _ => None,
|
||||
};
|
||||
|
||||
PusherWithActivation { pusher, activated }
|
||||
})
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
Ok(get_pushers::v3::Response::new(pushers))
|
||||
}
|
||||
|
||||
/// # `POST /_matrix/client/r0/pushers/set`
|
||||
@@ -475,12 +506,50 @@ pub(crate) async fn set_pushers_route(
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
let sender_device = body.identity.expect_sender_device()?;
|
||||
|
||||
services
|
||||
let needs_activation = services
|
||||
.pusher
|
||||
.set_pusher(sender_user, sender_device, &body.action)
|
||||
.await?;
|
||||
|
||||
Ok(set_pusher::v3::Response::new())
|
||||
Ok(set_pusher::v3::Response::new(needs_activation))
|
||||
}
|
||||
|
||||
pub(crate) async fn pushers_ack_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<pushers_ack::Request>,
|
||||
) -> Result<pushers_ack::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
match services
|
||||
.pusher
|
||||
.activate_webpush_pusher(sender_user, &body.app_id, &body.ack_token)
|
||||
.await?
|
||||
{
|
||||
| ActivationOutcome::Activated => Ok(pushers_ack::Response::new()),
|
||||
| ActivationOutcome::NoSuchPusher => {
|
||||
Err!(Request(NotFound("No pusher with this app ID exists.")))
|
||||
},
|
||||
| ActivationOutcome::UnknownToken => Err(Error::Request(
|
||||
UNKNOWN_ACTIVATION_TOKEN.clone(),
|
||||
"Unknown activation token.".into(),
|
||||
http::StatusCode::BAD_REQUEST,
|
||||
)),
|
||||
| ActivationOutcome::Expired => Err(Error::Request(
|
||||
EXPIRED_ACTIVATION_TOKEN.clone(),
|
||||
"Activation token has expired.".into(),
|
||||
http::StatusCode::BAD_REQUEST,
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
static EXPIRED_ACTIVATION_TOKEN: LazyLock<ErrorKind> =
|
||||
LazyLock::new(|| custom_error_kind("ORG.MATRIX.MSC4174_EXPIRED_ACTIVATION_TOKEN"));
|
||||
static UNKNOWN_ACTIVATION_TOKEN: LazyLock<ErrorKind> =
|
||||
LazyLock::new(|| custom_error_kind("ORG.MATRIX.MSC4174_UNKNOWN_ACTIVATION_TOKEN"));
|
||||
|
||||
fn custom_error_kind(errcode: &str) -> ErrorKind {
|
||||
serde_json::from_value(serde_json::json!({ "errcode": errcode }))
|
||||
.expect("errcode deserializes into an ErrorKind")
|
||||
}
|
||||
|
||||
/// user somehow has bad push rules, these must always exist per spec.
|
||||
|
||||
@@ -77,7 +77,7 @@ pub(crate) async fn set_read_marker_route(
|
||||
.readreceipt_update(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
&ReceiptEvent::new(
|
||||
ReceiptEvent::new(
|
||||
body.room_id.clone(),
|
||||
ReceiptEventContent::from_iter(receipt_content),
|
||||
),
|
||||
@@ -103,7 +103,8 @@ pub(crate) async fn set_read_marker_route(
|
||||
services
|
||||
.rooms
|
||||
.read_receipt
|
||||
.private_read_set(&body.room_id, sender_user, count);
|
||||
.private_read_set(&body.room_id, sender_user, event, count)
|
||||
.await;
|
||||
}
|
||||
|
||||
services.sync.wake(sender_user).await;
|
||||
@@ -176,7 +177,7 @@ pub(crate) async fn create_receipt_route(
|
||||
.readreceipt_update(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
&ReceiptEvent::new(
|
||||
ReceiptEvent::new(
|
||||
body.room_id.clone(),
|
||||
ReceiptEventContent::from_iter(receipt_content),
|
||||
),
|
||||
@@ -200,7 +201,8 @@ pub(crate) async fn create_receipt_route(
|
||||
services
|
||||
.rooms
|
||||
.read_receipt
|
||||
.private_read_set(&body.room_id, sender_user, count);
|
||||
.private_read_set(&body.room_id, sender_user, &body.event_id, count)
|
||||
.await;
|
||||
},
|
||||
| _ => {
|
||||
return Err!(Request(InvalidParam(warn!(
|
||||
|
||||
+170
-155
@@ -1,18 +1,23 @@
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::collections::{BTreeMap, BTreeSet, HashSet};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Error, Result, debug, debug_info, err, info,
|
||||
matrix::{StateKey, pdu::PartialPdu},
|
||||
trace, warn,
|
||||
trace,
|
||||
utils::to_canonical_object,
|
||||
warn,
|
||||
};
|
||||
use conduwuit_service::{Services, appservice::RegistrationInfo};
|
||||
use futures::FutureExt;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, Int, MilliSecondsSinceUnixEpoch, OwnedRoomAliasId,
|
||||
OwnedUserId, RoomAliasId, RoomId, RoomVersionId, UserId,
|
||||
OwnedUserId, RoomAliasId, RoomId,
|
||||
api::{
|
||||
client::room::{self, create_room},
|
||||
client::room::{
|
||||
self,
|
||||
create_room::{self, RoomPowerLevelsContentOverride, v3::CreationContent},
|
||||
},
|
||||
error::ErrorKind::Forbidden,
|
||||
},
|
||||
assign,
|
||||
@@ -33,13 +38,24 @@ use ruma::{
|
||||
},
|
||||
int,
|
||||
room_version_rules::{AuthorizationRules, RoomIdFormatVersion},
|
||||
serde::{JsonObject, Raw},
|
||||
serde::Raw,
|
||||
};
|
||||
use ruminuwuity::invite_permission_config::FilterLevel;
|
||||
use serde_json::{json, value::to_raw_value};
|
||||
use serde::Deserialize;
|
||||
use serde_json::value::to_raw_value;
|
||||
|
||||
use crate::{Ruma, client::invite_helper};
|
||||
|
||||
// We use this to keep around extra data in the `creation_content`
|
||||
// while still parsing and validating keys that we care about.
|
||||
#[derive(Deserialize, Default)]
|
||||
struct FullCreationContent {
|
||||
#[serde(flatten)]
|
||||
creation_content: CreationContent,
|
||||
#[serde(flatten)]
|
||||
extra_create_keys: CanonicalJsonObject,
|
||||
}
|
||||
|
||||
/// # `POST /_matrix/client/v3/createRoom`
|
||||
///
|
||||
/// Creates a new room.
|
||||
@@ -153,6 +169,12 @@ pub(crate) async fn create_room_route(
|
||||
return Err!(Request(Forbidden("Publishing rooms to the room directory is not allowed")));
|
||||
}
|
||||
|
||||
// Figure out preset. We need it for preset specific events
|
||||
let preset = body.preset.clone().unwrap_or(match &body.visibility {
|
||||
| room::Visibility::Public => RoomPreset::PublicChat,
|
||||
| _ => RoomPreset::PrivateChat, // Room visibility should not be custom
|
||||
});
|
||||
|
||||
let mut invitees = BTreeSet::new();
|
||||
|
||||
for recipient_user in &body.invite {
|
||||
@@ -191,54 +213,67 @@ pub(crate) async fn create_room_route(
|
||||
| _ => None,
|
||||
};
|
||||
|
||||
let create_content = match &body.creation_content {
|
||||
| Some(content) => {
|
||||
use RoomVersionId::*;
|
||||
let FullCreationContent { creation_content, mut extra_create_keys } = body
|
||||
.creation_content
|
||||
.as_ref()
|
||||
.map(Raw::deserialize_as_unchecked::<FullCreationContent>)
|
||||
.transpose()
|
||||
.map_err(|e| err!(Request(BadJson(error!("Failed to parse creation content: {e}")))))?
|
||||
.unwrap_or_default();
|
||||
|
||||
let mut content = content
|
||||
.deserialize_as_unchecked::<CanonicalJsonObject>()
|
||||
.map_err(|e| {
|
||||
err!(Request(BadJson(error!(
|
||||
"Failed to deserialise content as canonical JSON: {e}"
|
||||
))))
|
||||
})?;
|
||||
|
||||
match room_version {
|
||||
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 => {
|
||||
content.insert(
|
||||
"creator".into(),
|
||||
json!(&sender_user).try_into().map_err(|e| {
|
||||
err!(Request(BadJson(debug_error!("Invalid creation content: {e}"))))
|
||||
})?,
|
||||
);
|
||||
},
|
||||
| _ => {
|
||||
// V11+ removed the "creator" key
|
||||
},
|
||||
}
|
||||
content.insert(
|
||||
"room_version".into(),
|
||||
json!(room_version.as_str())
|
||||
.try_into()
|
||||
.map_err(|e| err!(Request(BadJson("Invalid creation content: {e}"))))?,
|
||||
);
|
||||
content
|
||||
},
|
||||
| None => {
|
||||
use RoomVersionId::*;
|
||||
|
||||
let content = match room_version {
|
||||
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 =>
|
||||
RoomCreateEventContent::new_v1(sender_user.to_owned()),
|
||||
| _ => RoomCreateEventContent::new_v11(),
|
||||
};
|
||||
let mut content =
|
||||
serde_json::from_str::<CanonicalJsonObject>(to_raw_value(&content)?.get())?;
|
||||
content.insert("room_version".into(), json!(room_version.as_str()).try_into()?);
|
||||
content
|
||||
},
|
||||
let mut create_event_content = if room_version_rules.authorization.use_room_create_sender {
|
||||
RoomCreateEventContent::new_v11()
|
||||
} else {
|
||||
RoomCreateEventContent::new_v1(sender_user.to_owned())
|
||||
};
|
||||
|
||||
let mut privileged_creators = HashSet::new();
|
||||
|
||||
create_event_content.federate = creation_content.federate;
|
||||
create_event_content.predecessor = creation_content.predecessor;
|
||||
create_event_content.room_type = creation_content.room_type;
|
||||
create_event_content.room_version = room_version.clone();
|
||||
|
||||
if room_version_rules.authorization.additional_room_creators {
|
||||
create_event_content.additional_creators = creation_content.additional_creators;
|
||||
|
||||
// If we're making a trusted private chat, add the invitees as
|
||||
// additional creators
|
||||
if preset == RoomPreset::TrustedPrivateChat {
|
||||
create_event_content
|
||||
.additional_creators
|
||||
.extend(invitees.iter().cloned());
|
||||
}
|
||||
|
||||
// Make sure the primary creator of the room isn't in the additional
|
||||
// creator list
|
||||
if create_event_content
|
||||
.additional_creators
|
||||
.iter()
|
||||
.any(|user| user == sender_user)
|
||||
{
|
||||
return Err!(Request(InvalidParam(
|
||||
"The primary creator of the room may not also be an additional creator."
|
||||
)));
|
||||
}
|
||||
|
||||
// Sort and deduplicate additional creators to avoid any funny business
|
||||
create_event_content.additional_creators.sort();
|
||||
create_event_content.additional_creators.dedup();
|
||||
}
|
||||
|
||||
// Track privileged creators so we can remove them from PLs later
|
||||
if room_version_rules
|
||||
.authorization
|
||||
.explicitly_privilege_room_creators
|
||||
{
|
||||
privileged_creators.insert(sender_user.to_owned());
|
||||
|
||||
if room_version_rules.authorization.additional_room_creators {
|
||||
privileged_creators.extend(create_event_content.additional_creators.iter().cloned());
|
||||
}
|
||||
}
|
||||
|
||||
let state_lock = match room_id.clone() {
|
||||
| Some(room_id) => {
|
||||
let _short_id = services
|
||||
@@ -272,13 +307,20 @@ pub(crate) async fn create_room_route(
|
||||
.map(MilliSecondsSinceUnixEpoch)
|
||||
};
|
||||
|
||||
let mut create_event_content = to_canonical_object(create_event_content)
|
||||
.expect("should be able to serialize create event content");
|
||||
|
||||
// `extra_create_keys` can't clobber any important fields because we
|
||||
// already pulled them out into `create_event_content`
|
||||
create_event_content.append(&mut extra_create_keys);
|
||||
|
||||
let create_event_id = services
|
||||
.rooms
|
||||
.timeline
|
||||
.build_and_append_pdu(
|
||||
PartialPdu {
|
||||
event_type: TimelineEventType::RoomCreate,
|
||||
content: to_raw_value(&create_content)?,
|
||||
content: to_raw_value(&create_event_content)?,
|
||||
state_key: Some(StateKey::new()),
|
||||
timestamp: custom_origin_server_ts,
|
||||
..Default::default()
|
||||
@@ -289,6 +331,7 @@ pub(crate) async fn create_room_route(
|
||||
)
|
||||
.boxed()
|
||||
.await?;
|
||||
|
||||
trace!("Created room create event with ID {}", &create_event_id);
|
||||
let room_id = match room_id.clone() {
|
||||
| Some(room_id) => room_id,
|
||||
@@ -330,64 +373,27 @@ pub(crate) async fn create_room_route(
|
||||
.await?;
|
||||
|
||||
// 3. Power levels
|
||||
let mut power_levels_to_grant = BTreeMap::new();
|
||||
|
||||
// Figure out preset. We need it for preset specific events
|
||||
let preset = body.preset.clone().unwrap_or(match &body.visibility {
|
||||
| room::Visibility::Public => RoomPreset::PublicChat,
|
||||
| _ => RoomPreset::PrivateChat, // Room visibility should not be custom
|
||||
});
|
||||
// If this room version doesn't privilege creators, grant PLs to them
|
||||
if !room_version_rules
|
||||
.authorization
|
||||
.explicitly_privilege_room_creators
|
||||
{
|
||||
power_levels_to_grant.insert(sender_user.to_owned(), int!(100));
|
||||
|
||||
let mut power_levels_to_grant = BTreeMap::from_iter([(sender_user.to_owned(), int!(100))]);
|
||||
let mut creators: Vec<OwnedUserId> = vec![sender_user.to_owned()];
|
||||
|
||||
if preset == RoomPreset::TrustedPrivateChat {
|
||||
for recipient_user in invitees.iter().cloned() {
|
||||
if room_version_rules
|
||||
.authorization
|
||||
.explicitly_privilege_room_creators
|
||||
{
|
||||
creators.push(recipient_user);
|
||||
} else {
|
||||
if preset == RoomPreset::TrustedPrivateChat {
|
||||
for recipient_user in invitees.iter().cloned() {
|
||||
power_levels_to_grant.insert(recipient_user, int!(100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do we care about additional_creators?
|
||||
if room_version_rules
|
||||
.authorization
|
||||
.explicitly_privilege_room_creators
|
||||
{
|
||||
// Have they been specified?
|
||||
if let Some(additional_creators) = create_content.get("additional_creators") {
|
||||
// Are they a real array?
|
||||
if let Some(additional_creators) = additional_creators.as_array() {
|
||||
// Iterate through them
|
||||
for creator in additional_creators {
|
||||
// Are they a string?
|
||||
if let Some(creator) = creator.as_str() {
|
||||
// Do they parse into a real user ID?
|
||||
if let Ok(creator) = UserId::parse(creator) {
|
||||
// Add them to the power levels and creators
|
||||
creators.push(creator);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
power_levels_to_grant.insert(sender_user.to_owned(), int!(100));
|
||||
creators.clear(); // If this vec is not empty, default_power_levels_content will
|
||||
// treat this as a v12 room
|
||||
}
|
||||
|
||||
let power_levels_content = default_power_levels_content(
|
||||
body.power_level_content_override
|
||||
.as_ref()
|
||||
.map(Raw::cast_ref),
|
||||
body.power_level_content_override.as_ref(),
|
||||
&body.visibility,
|
||||
power_levels_to_grant,
|
||||
creators,
|
||||
privileged_creators,
|
||||
&room_version_rules.authorization,
|
||||
)?;
|
||||
|
||||
@@ -619,74 +625,83 @@ pub(crate) async fn create_room_route(
|
||||
}
|
||||
|
||||
/// creates the power_levels_content for the PDU builder
|
||||
#[allow(clippy::or_fun_call)]
|
||||
fn default_power_levels_content(
|
||||
power_level_content_override: Option<&Raw<RoomPowerLevelsEventContent>>,
|
||||
power_level_content_override: Option<&Raw<RoomPowerLevelsContentOverride>>,
|
||||
visibility: &room::Visibility,
|
||||
users: BTreeMap<OwnedUserId, Int>,
|
||||
creators: Vec<OwnedUserId>,
|
||||
mut users: BTreeMap<OwnedUserId, Int>,
|
||||
creators: HashSet<OwnedUserId>,
|
||||
authorization_rules: &AuthorizationRules,
|
||||
) -> Result<serde_json::Value> {
|
||||
let mut power_levels_content =
|
||||
serde_json::to_value(assign!(RoomPowerLevelsEventContent::new(authorization_rules), {
|
||||
users
|
||||
}))
|
||||
.unwrap();
|
||||
) -> Result<RoomPowerLevelsEventContent> {
|
||||
use ruma::events::TimelineEventType::*;
|
||||
|
||||
let mut power_levels_content = power_level_content_override
|
||||
.map(Raw::cast_ref::<RoomPowerLevelsEventContent>)
|
||||
.map(Raw::deserialize)
|
||||
.transpose()
|
||||
.map_err(|err| err!(Request(BadJson("Invalid power_level_content_override: {err:?}"))))?
|
||||
.map_or_else(
|
||||
|| RoomPowerLevelsEventContent::new(authorization_rules),
|
||||
|mut content| {
|
||||
if authorization_rules.explicitly_privilege_room_creators {
|
||||
// If an override was supplied we need to make sure the
|
||||
// tombstone default is raised to 150
|
||||
// for v12+. Otherwise, if one wasn't supplied,
|
||||
// `RoomPowerLevelsEventContent::new` will handle this.
|
||||
|
||||
content.events.entry(RoomTombstone).or_insert(int!(150));
|
||||
}
|
||||
|
||||
content
|
||||
},
|
||||
);
|
||||
|
||||
power_levels_content.users.append(&mut users);
|
||||
|
||||
for creator in creators {
|
||||
power_levels_content.users.remove(&creator);
|
||||
}
|
||||
|
||||
// secure proper defaults of sensitive/dangerous permissions that moderators
|
||||
// (power level 50) should not have easy access to
|
||||
power_levels_content["events"]["m.room.power_levels"] =
|
||||
serde_json::to_value(100).expect("100 is valid Value");
|
||||
power_levels_content["events"]["m.room.server_acl"] =
|
||||
serde_json::to_value(100).expect("100 is valid Value");
|
||||
power_levels_content["events"]["m.room.tombstone"] =
|
||||
serde_json::to_value(100).expect("100 is valid Value");
|
||||
power_levels_content["events"]["m.room.encryption"] =
|
||||
serde_json::to_value(100).expect("100 is valid Value");
|
||||
power_levels_content["events"]["m.room.history_visibility"] =
|
||||
serde_json::to_value(100).expect("100 is valid Value");
|
||||
let admin_only_events = [
|
||||
RoomPowerLevels,
|
||||
RoomServerAcl,
|
||||
// this will not apply for v12+ rooms since we raised it to 150 earlier
|
||||
RoomTombstone,
|
||||
RoomEncryption,
|
||||
RoomHistoryVisibility,
|
||||
];
|
||||
|
||||
for event_type in admin_only_events {
|
||||
power_levels_content
|
||||
.events
|
||||
.entry(event_type)
|
||||
.or_insert(int!(100));
|
||||
}
|
||||
|
||||
// always allow users to respond (not post new) to polls. this is primarily
|
||||
// useful in read-only announcement rooms that post a public poll.
|
||||
power_levels_content["events"]["org.matrix.msc3381.poll.response"] =
|
||||
serde_json::to_value(0).expect("0 is valid Value");
|
||||
power_levels_content["events"]["m.poll.response"] =
|
||||
serde_json::to_value(0).expect("0 is valid Value");
|
||||
power_levels_content
|
||||
.events
|
||||
.entry(PollResponse)
|
||||
.or_insert(int!(0));
|
||||
power_levels_content
|
||||
.events
|
||||
.entry(UnstablePollResponse)
|
||||
.or_insert(int!(0));
|
||||
|
||||
// synapse does this too. clients do not expose these permissions. it
|
||||
// prevents default users from calling public rooms, for obvious reasons.
|
||||
if *visibility == room::Visibility::Public {
|
||||
power_levels_content["events"]["m.call.invite"] =
|
||||
serde_json::to_value(50).expect("50 is valid Value");
|
||||
power_levels_content["events"]["m.call"] =
|
||||
serde_json::to_value(50).expect("50 is valid Value");
|
||||
power_levels_content["events"]["m.call.member"] =
|
||||
serde_json::to_value(50).expect("50 is valid Value");
|
||||
power_levels_content["events"]["org.matrix.msc3401.call"] =
|
||||
serde_json::to_value(50).expect("50 is valid Value");
|
||||
power_levels_content["events"]["org.matrix.msc3401.call.member"] =
|
||||
serde_json::to_value(50).expect("50 is valid Value");
|
||||
}
|
||||
|
||||
if let Some(power_level_content_override) = power_level_content_override {
|
||||
let json: JsonObject = serde_json::from_str(power_level_content_override.json().get())
|
||||
.map_err(|e| err!(Request(BadJson("Invalid power_level_content_override: {e:?}"))))?;
|
||||
|
||||
for (key, value) in json {
|
||||
power_levels_content[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
if !creators.is_empty() {
|
||||
// Raise the default power level of tombstone to 150
|
||||
power_levels_content["events"]["m.room.tombstone"] =
|
||||
serde_json::to_value(150).expect("150 is valid Value");
|
||||
for creator in creators {
|
||||
// Omit creators from the power level list altogether
|
||||
power_levels_content["users"]
|
||||
.as_object_mut()
|
||||
.expect("users is an object")
|
||||
.remove(creator.as_str());
|
||||
}
|
||||
power_levels_content
|
||||
.events
|
||||
.entry(CallInvite)
|
||||
.or_insert(int!(50));
|
||||
power_levels_content
|
||||
.events
|
||||
.entry(CallMember)
|
||||
.or_insert(int!(50));
|
||||
}
|
||||
|
||||
Ok(power_levels_content)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Event, Result, debug_warn, err};
|
||||
use futures::{FutureExt, TryFutureExt, future::try_join};
|
||||
use ruma::api::client::room::get_room_event;
|
||||
|
||||
use crate::{Ruma, client::is_ignored_pdu};
|
||||
@@ -16,19 +15,35 @@ pub(crate) async fn get_room_event_route(
|
||||
let event_id = &body.event_id;
|
||||
let room_id = &body.room_id;
|
||||
|
||||
let event = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_remote_pdu(room_id, event_id)
|
||||
.map_err(|_| err!(Request(NotFound("Event {} not found.", event_id))));
|
||||
let mut event = match services.rooms.timeline.get_pdu(event_id).await {
|
||||
| Ok(event) => event,
|
||||
| Err(e) if e.is_not_found() => {
|
||||
// Only fetch over federation for users who could see the event.
|
||||
let (joined, world_readable) = tokio::join!(
|
||||
services.rooms.state_cache.is_joined(sender_user, room_id),
|
||||
services.rooms.state_accessor.is_world_readable(room_id)
|
||||
);
|
||||
if !joined && !world_readable {
|
||||
return Err!(Request(NotFound("Event {} not found.", event_id)));
|
||||
}
|
||||
|
||||
services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_remote_pdu(room_id, event_id)
|
||||
.await
|
||||
.map_err(|_| err!(Request(NotFound("Event {} not found.", event_id))))?
|
||||
},
|
||||
| Err(e) => return Err(e),
|
||||
};
|
||||
|
||||
// NOTE: checked after fetching, as visibility of an unknown event cannot
|
||||
// be determined (user_can_see_event returns true for those).
|
||||
let visible = services
|
||||
.rooms
|
||||
.state_accessor
|
||||
.user_can_see_event(sender_user, room_id, event_id)
|
||||
.map(Ok);
|
||||
|
||||
let (mut event, visible) = try_join(event, visible).await?;
|
||||
.await;
|
||||
|
||||
if !visible || is_ignored_pdu(services, &event, sender_user).await? {
|
||||
return Err!(Request(Forbidden("You don't have permission to view this event.")));
|
||||
@@ -43,7 +58,12 @@ pub(crate) async fn get_room_event_route(
|
||||
debug_warn!("Failed to add bundled aggregations to event: {e}");
|
||||
}
|
||||
|
||||
event.set_unsigned(Some(body.identity.expect_sender_user()?));
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&event, Some(sender_user))
|
||||
.await;
|
||||
event.set_unsigned(Some(ctx))?;
|
||||
|
||||
Ok(get_room_event::v3::Response::new(event.into_format()))
|
||||
}
|
||||
@@ -1,15 +1,22 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Event, Result, at, debug_warn,
|
||||
utils::{BoolExt, stream::TryTools},
|
||||
result::LogErr,
|
||||
utils::{
|
||||
BoolExt,
|
||||
stream::{TryIgnore, WidebandExt},
|
||||
},
|
||||
};
|
||||
use futures::{FutureExt, TryStreamExt, future::try_join4};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt, future::try_join4};
|
||||
use ruma::{
|
||||
api::client::peeking::get_current_state::v3::{PaginationChunk, Request, Response},
|
||||
assign,
|
||||
};
|
||||
|
||||
use crate::Ruma;
|
||||
use crate::{
|
||||
Ruma,
|
||||
client::{ignored_filter, visibility_filter},
|
||||
};
|
||||
|
||||
const LIMIT_MAX: usize = 100;
|
||||
|
||||
@@ -51,9 +58,17 @@ pub(crate) async fn room_initial_sync_route(
|
||||
.rooms
|
||||
.timeline
|
||||
.pdus_rev(room_id, None)
|
||||
.try_take(limit)
|
||||
.and_then(async |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
.ignore_err()
|
||||
.wide_filter_map(|item| ignored_filter(&services, item, sender_user))
|
||||
.wide_filter_map(|item| visibility_filter(&services, item, sender_user))
|
||||
.take(limit)
|
||||
.wide_then(async |mut pdu| {
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
if let Err(e) = services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
@@ -71,6 +86,10 @@ pub(crate) async fn room_initial_sync_route(
|
||||
.boxed()
|
||||
.await?;
|
||||
|
||||
if events.is_empty() {
|
||||
return Ok(Response::new(room_id.to_owned()));
|
||||
}
|
||||
|
||||
let end = events
|
||||
.first()
|
||||
.map(at!(0))
|
||||
|
||||
@@ -2,11 +2,12 @@ mod aliases;
|
||||
mod create;
|
||||
mod event;
|
||||
mod initial_sync;
|
||||
mod stripped_state;
|
||||
mod summary;
|
||||
mod upgrade;
|
||||
|
||||
pub(crate) use self::{
|
||||
aliases::get_room_aliases_route, create::create_room_route, event::get_room_event_route,
|
||||
initial_sync::room_initial_sync_route, summary::get_room_summary,
|
||||
upgrade::upgrade_room_route,
|
||||
initial_sync::room_initial_sync_route, stripped_state::get_stripped_state_route,
|
||||
summary::get_room_summary, upgrade::upgrade_room_route,
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Result};
|
||||
use ruma::{
|
||||
api::client::state::get_stripped_state, assign, events::ALLOWED_STRIPPED_STATE_EVENTS,
|
||||
};
|
||||
use service::rooms::summary::{Accessibility, RoomStrippedState};
|
||||
|
||||
use crate::{Ruma, router::ClientIdentity};
|
||||
|
||||
/// # `POST /_matrix/client/unstable/org.continuwuity.msc4560.stripped_state/{room_id_or_alias}` ([MSC4560])
|
||||
///
|
||||
/// Returns a room's stripped state.
|
||||
///
|
||||
/// [MSC4560]: https://github.com/matrix-org/matrix-spec-proposals/pull/4560
|
||||
#[tracing::instrument(skip_all, name = "stripped_state", level = "info")]
|
||||
pub(crate) async fn get_stripped_state_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_stripped_state::unstable::Request>,
|
||||
) -> Result<get_stripped_state::unstable::Response> {
|
||||
let user_id = body.identity.as_ref().and_then(ClientIdentity::sender_user);
|
||||
|
||||
if body.via.len() > get_stripped_state::unstable::MAX_VIAS {
|
||||
return Err!(Request(TooLarge("Too many vias, please be less indecisive.")));
|
||||
}
|
||||
|
||||
if let Some(forbidden_type) = body
|
||||
.state
|
||||
.iter()
|
||||
.find(|event_type| !ALLOWED_STRIPPED_STATE_EVENTS.contains(event_type))
|
||||
{
|
||||
return Err!(Request(InvalidParam(
|
||||
"Event type {forbidden_type} may not be requested as stripped state."
|
||||
)));
|
||||
}
|
||||
|
||||
let (room_id, _) = services
|
||||
.rooms
|
||||
.alias
|
||||
.resolve_with_servers(&body.room_id_or_alias, Some(body.via.clone()))
|
||||
.await?;
|
||||
|
||||
if services.rooms.metadata.is_banned(&room_id).await {
|
||||
return Err!(Request(Forbidden("This room is banned on this homeserver.")));
|
||||
}
|
||||
|
||||
match services
|
||||
.rooms
|
||||
.summary
|
||||
.get_stripped_state_for_user(
|
||||
user_id,
|
||||
&room_id,
|
||||
&body.via,
|
||||
&body.state,
|
||||
body.num_joined_members,
|
||||
)
|
||||
.await
|
||||
{
|
||||
| Accessibility::Accessible((
|
||||
via,
|
||||
RoomStrippedState { state, num_joined_members, .. },
|
||||
)) => Ok(
|
||||
assign!(get_stripped_state::unstable::Response::new(via), { state, num_joined_members }),
|
||||
),
|
||||
| Accessibility::Inaccessible => {
|
||||
Err!(Request(Forbidden("You may not request this room's stripped state.")))
|
||||
},
|
||||
| Accessibility::NotFound => {
|
||||
Err!(Request(NotFound("This room does not exist.")))
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ pub(crate) async fn get_room_summary(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_summary::v1::Request>,
|
||||
) -> Result<get_summary::v1::Response> {
|
||||
let (room_id, servers) = services
|
||||
let (room_id, _) = services
|
||||
.rooms
|
||||
.alias
|
||||
.resolve_with_servers(&body.room_id_or_alias, Some(body.via.clone()))
|
||||
@@ -27,12 +27,9 @@ pub(crate) async fn get_room_summary(
|
||||
.rooms
|
||||
.summary
|
||||
.get_room_summary_for_user(
|
||||
body.identity
|
||||
.as_ref()
|
||||
.map(ClientIdentity::expect_sender_user)
|
||||
.transpose()?,
|
||||
body.identity.as_ref().and_then(ClientIdentity::sender_user),
|
||||
&room_id,
|
||||
&servers,
|
||||
&body.via,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
+23
-2
@@ -6,7 +6,10 @@ use conduwuit::{
|
||||
matrix::pdu::{PartialPdu, sticky},
|
||||
utils,
|
||||
};
|
||||
use ruma::{api::client::message::send_message_event, events::MessageLikeEventType};
|
||||
use ruma::{
|
||||
OwnedEventId, api::client::message::send_message_event, events::MessageLikeEventType,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use serde_json::from_str;
|
||||
|
||||
use crate::{Ruma, client_ip::ClientIp};
|
||||
@@ -77,6 +80,13 @@ pub(crate) async fn send_message_event_route(
|
||||
|
||||
let content = from_str(body.body.body.json().get())
|
||||
.map_err(|e| err!(Request(BadJson("Invalid JSON body: {e}"))))?;
|
||||
let redacts = if body.body.event_type == MessageLikeEventType::RoomRedaction {
|
||||
from_str::<MaybeRedaction>(body.body.body.json().get())
|
||||
.ok()
|
||||
.and_then(|r| r.redacts)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let event_id = services
|
||||
.rooms
|
||||
@@ -92,11 +102,14 @@ pub(crate) async fn send_message_event_route(
|
||||
.flatten()
|
||||
.map(sticky::object),
|
||||
unsigned: Some(unsigned),
|
||||
timestamp: if body.identity.is_appservice() {
|
||||
timestamp: if body.identity.is_appservice()
|
||||
|| services.admin.user_is_admin(sender_user).await
|
||||
{
|
||||
body.timestamp
|
||||
} else {
|
||||
None
|
||||
},
|
||||
redacts,
|
||||
..Default::default()
|
||||
},
|
||||
sender_user,
|
||||
@@ -116,3 +129,11 @@ pub(crate) async fn send_message_event_route(
|
||||
|
||||
Ok(send_message_event::v3::Response::new(event_id))
|
||||
}
|
||||
|
||||
/// Struct containing exclusively the `redacts` field for MSC4169 compatible
|
||||
/// redaction moving.
|
||||
#[derive(Deserialize)]
|
||||
struct MaybeRedaction {
|
||||
#[serde(default)]
|
||||
redacts: Option<OwnedEventId>,
|
||||
}
|
||||
@@ -6,8 +6,10 @@ use std::collections::VecDeque;
|
||||
use conduwuit::{
|
||||
Event, PduCount, Result, debug_warn, err,
|
||||
matrix::pdu::PduEvent,
|
||||
ref_at, trace,
|
||||
utils::stream::{BroadbandExt, ReadyExt, TryIgnore},
|
||||
ref_at,
|
||||
result::LogErr,
|
||||
trace,
|
||||
utils::stream::{BroadbandExt, ReadyExt, TryIgnore, WidebandExt},
|
||||
};
|
||||
use conduwuit_service::Services;
|
||||
use futures::StreamExt;
|
||||
@@ -83,9 +85,14 @@ async fn load_timeline(
|
||||
.pdus_rev(room_id, ending_count.map(|count| count.saturating_add(1)))
|
||||
.ignore_err()
|
||||
.ready_take_while(move |&(pducount, _)| pducount > starting_count)
|
||||
.map(move |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
pdu
|
||||
.wide_filter_map(async |mut pdu| {
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
Some(pdu)
|
||||
})
|
||||
.then(async move |mut pdu| {
|
||||
if let Err(e) = services
|
||||
@@ -108,9 +115,14 @@ async fn load_timeline(
|
||||
.timeline
|
||||
.pdus_rev(room_id, ending_count.map(|count| count.saturating_add(1)))
|
||||
.ignore_err()
|
||||
.map(move |mut pdu| {
|
||||
pdu.1.set_unsigned(Some(sender_user));
|
||||
pdu
|
||||
.wide_filter_map(async |mut pdu| {
|
||||
let ctx = services
|
||||
.rooms
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
Some(pdu)
|
||||
})
|
||||
.then(async move |mut pdu| {
|
||||
if let Err(e) = services
|
||||
|
||||
Loaded 100 of 236 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user