Compare commits

..
Author SHA1 Message Date
timedout ce178d86d5 feat(admin): List user memberships route 2026-10-10 23:58:24 +01:00
timedout 02f4f9d88d feat(admin): Create user route 2026-10-10 23:11:37 +01:00
timedout 1deaf99409 feat(admin): List users endpoint 2026-10-05 05:08:36 +01:00
241 changed files with 3030 additions and 13440 deletions

No files matched your search

@@ -44,7 +44,7 @@ runs:
- name: Login to builtin registry
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
registry: ${{ env.BUILTIN_REGISTRY }}
username: ${{ inputs.registry_user }}
@@ -79,7 +79,7 @@ runs:
- name: Login to builtin registry
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
registry: ${{ env.BUILTIN_REGISTRY }}
username: ${{ inputs.registry_user }}
+1 -1
View File
@@ -7,7 +7,7 @@ runs:
using: composite
steps:
- name: Install sccache
uses: https://forgejo.ellis.link/continuwuation/sccache-action@v1
uses: https://git.tomfos.tr/tom/sccache-action@v1
- name: Configure sccache
uses: https://github.com/actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
@@ -29,7 +29,7 @@ runs:
steps:
- name: Detect runner OS
id: runner-os
uses: https://forgejo.ellis.link/continuwuation/detect-versions@v1
uses: https://git.tomfos.tr/actions/detect-versions@v1
- name: Configure cross-compilation architecture
if: inputs.dpkg-arch != ''
+2 -2
View File
@@ -39,7 +39,7 @@ runs:
steps:
- name: Detect runner OS
id: runner-os
uses: https://forgejo.ellis.link/continuwuation/detect-versions@v1
uses: https://git.tomfos.tr/actions/detect-versions@v1
- name: Configure Cargo environment
shell: bash
@@ -147,7 +147,7 @@ runs:
run: echo "::group::📦 Restoring build cache"
- name: Setup sccache
uses: https://forgejo.ellis.link/continuwuation/sccache-action@v1
uses: https://git.tomfos.tr/tom/sccache-action@v1
- name: End build cache restore group
shell: bash
+1 -1
View File
@@ -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@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: https://github.com/taiki-e/install-action@4cef1412cce204788f482e778a0b9187f9626a29 # v2
with:
tool: git-warp-time,timelord-cli@3.0.1
+2 -2
View File
@@ -60,7 +60,7 @@ jobs:
cargo-debian-${{ steps.debian-version.outputs.distribution }}-${{ matrix.arch }}-
- name: Setup sccache
uses: https://forgejo.ellis.link/continuwuation/sccache-action@v1
uses: https://git.tomfos.tr/tom/sccache-action@v1
- name: Configure sccache environment
run: |
@@ -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
+3 -3
View File
@@ -28,13 +28,13 @@ jobs:
- name: Detect runner environment
id: runner-env
uses: https://forgejo.ellis.link/continuwuation/detect-versions@v1
uses: https://git.tomfos.tr/actions/detect-versions@v1
- 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@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
uses: https://github.com/actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 26
node-version: 24
- name: Cache npm dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
+1 -1
View File
@@ -55,7 +55,7 @@ jobs:
# repositories: continuwuity
- name: Install regsync
uses: https://github.com/regclient/actions/regsync-installer@dd58ad94f76adb73d8ac1bf75ed25f01545d5b32 # main
uses: https://github.com/regclient/actions/regsync-installer@bb562fac724b7b37c17f19671df07fe34fabc376 # main
- name: Check what images need mirroring
run: |
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
name: Renovate
runs-on: ubuntu-latest
container:
image: ghcr.io/renovatebot/renovate:44.210.1@sha256:45cc73346c44a9afe037f2d19766f2b545b59b2ed31b937b5b09017d2958e45f
image: ghcr.io/renovatebot/renovate:44.115.13@sha256:c19ab7a16ed7cbe8f7f11e2435e67c727ba90107930d3324c8d1cdec808f0055
options: --tmpfs /tmp:exec
steps:
- name: Checkout
+1 -2
View File
@@ -7,7 +7,6 @@ f419c64aca300a338096b4e0db4c73ace54f23d0
5998a0d883d31b866f7c8c46433a8857eae51a89
# trailing whitespace and newlines
46c193e74b2ce86c48ce802333a0aabce37fd6e9
# rustfmt updates that rewrapped tons of comments
# rustfmt update that rewrapped tons of comments
9fbabe221051e6956a05d8824142092ede68971e
b0c0905472b882ff0cc79232e73d307fd0b5035b
9c27441acf2e65f85c106ccff5c6b6c37030ddca
-1
View File
@@ -1,4 +1,3 @@
open_collective: continuwuity
github: [JadedBlueEyes, timedoutuk, gingershaped]
custom:
- https://timedout.uk/donate.html
+1 -1
View File
@@ -24,7 +24,7 @@ repos:
- id: check-added-large-files
- repo: https://github.com/crate-ci/typos
rev: v1.51.1
rev: v1.50.3
hooks:
- id: typos
- id: typos
Generated
+209 -262
View File
File diff suppressed because it is too large. Load diff
+46 -64
View File
@@ -104,7 +104,6 @@ version = "0.8.8"
default-features = false
features = [
"form",
"query",
"http1",
"http2",
"json",
@@ -331,7 +330,7 @@ version = "2.1.1"
# used for MPSC channels
[workspace.dependencies.loole]
version = "0.6.0"
version = "0.4.0"
# used for MPMC channels
[workspace.dependencies.async-channel]
@@ -349,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 = "0ed7fba34213f18a628a56f527c6cc795cd7eef5"
rev = "e7384f01eacd454c593683de50491201e2160fd1"
features = [
"appservice-api-c",
"client-api",
@@ -380,16 +379,12 @@ 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",
]
@@ -418,43 +413,27 @@ version = "4.0.1"
# optional opentelemetry, performance measurements, flamegraphs, etc for performance measurements and monitoring
[workspace.dependencies.opentelemetry]
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"]
version = "0.32.0"
[workspace.dependencies.tracing-flame]
version = "0.2.0"
[workspace.dependencies.tracing-opentelemetry]
version = "0.34.0"
version = "0.33.0"
[workspace.dependencies.opentelemetry_sdk]
version = "0.33.0"
version = "0.32.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.33.0"
version = "0.32.0"
features = ["http", "grpc-tonic", "trace", "logs", "metrics"]
# optional sentry metrics for crash/panic reporting
[workspace.dependencies.sentry]
version = "0.49.0"
version = "0.48.0"
default-features = false
features = [
"backtrace",
@@ -469,9 +448,9 @@ features = [
]
[workspace.dependencies.sentry-tracing]
version = "0.49.0"
version = "0.48.0"
[workspace.dependencies.sentry-tower]
version = "0.49.0"
version = "0.48.0"
# jemalloc usage
[workspace.dependencies.tikv-jemalloc-sys]
@@ -545,7 +524,7 @@ features = ["hardware-lock-elision", "deadlock_detection"] # TODO: Check if dead
# Use this when extending with_lock::WithLock to parking_lot
[workspace.dependencies.lock_api]
version = "0.5.0"
version = "0.4.13"
[workspace.dependencies.bytesize]
version = "2.0"
@@ -680,6 +659,9 @@ default-features = false
[workspace.dependencies.ruminuwuity]
package = "ruminuwuity"
path = "src/ruminuwuity"
features = [
"unstable-msc4484"
]
###############################################################################
#
@@ -827,37 +809,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 = { 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
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
## some sadness
mismatched_lifetime_syntaxes = "allow" # TODO!
@@ -911,7 +893,6 @@ 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 }
@@ -954,6 +935,7 @@ 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"
@@ -999,7 +981,7 @@ let_underscore_future = { level = "allow", priority = 1 }
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 }
impl-trait-in-params = { level = "allow", priority = 1 }
needless_raw_string_hashes = "allow"
-3
View File
@@ -1,3 +0,0 @@
Implemented unstable support for [MSC4560] (Stripped state requests over federation). Contributed by @ginger.
[MSC4560]: https://github.com/matrix-org/matrix-spec-proposals/pull/4560
-1
View File
@@ -1 +0,0 @@
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.
-1
View File
@@ -1 +0,0 @@
Added support for MSC4363 (OAuth step-up authentication). Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
The first-run version of the web UI now includes a link to the registration page. Contributed by @ginger
-1
View File
@@ -1 +0,0 @@
Continuwuity now supports the OAuth 2.0 client credentials grant type, allowing secure automated access to the Matrix homeserver admin API, as well as future administrative functionality. Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
Room summary visibility checks are no longer incorrectly applied for remote rooms. Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
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.
@@ -1 +0,0 @@
Fix new devices sometimes never reaching other users' device lists. Contributed by @eleboucher.
@@ -1 +0,0 @@
Fix gap filling skipping outlier events that are missing their previous events. Contributed by @eleboucher.
@@ -1 +0,0 @@
Fix state resolution applying events out of order, which could undo room joins. Contributed by @eleboucher.
@@ -1 +0,0 @@
Fix to-device messages, including room keys, sometimes being lost before delivery. Contributed by @eleboucher.
-1
View File
@@ -1 +0,0 @@
Add support for using custom DNS servers instead of using /etc/resolv.conf. Contributed by @s1lv3r.
-1
View File
@@ -1 +0,0 @@
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
-1
View File
@@ -1 +0,0 @@
Fixed push gateway URLs containing the configured notification path outside of their suffix. Contributed by @eleboucher.
-1
View File
@@ -1 +0,0 @@
"!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.
-1
View File
@@ -1 +0,0 @@
Add a section on [troubleshooting Docker issues](https://continuwuity.org/troubleshooting#docker-issues). Contributed by @stratself.
-1
View File
@@ -1 +0,0 @@
Appservices now receive typing indicators and read receipts. Contributed by @Jade
-1
View File
@@ -1 +0,0 @@
Instructions for Authelia added to the [OIDC guide](https://continuwuity.org/authentication/oidc.html). Contributed by @fhoekstra
-1
View File
@@ -1 +0,0 @@
Correctly set RocksDB column options, including enabling block caches. Contributed by @Jade
-1
View File
@@ -1 +0,0 @@
Fix some possible deadlocks/freezes and reduce lock contention (improving performance). Contributed by @Jade
-1
View File
@@ -1 +0,0 @@
Docker compose examples now use bind mounts by default, instead of Docker volumes, as they are easier to work with esp. for backup/restore. Contributed by @stratself.
-1
View File
@@ -1 +0,0 @@
Once again fixed how room extremities are handled, fixing a problem that made continuwuity gradually make rooms needlessly complex, which also caused more frequent state resets.
-1
View File
@@ -1 +0,0 @@
The OAuth identity reset page is no longer linked from the account management UI to reduce confusion. Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
Fixed a worker panic when knocking on a room over federation. Contributed by @eleboucher.
-1
View File
@@ -1 +0,0 @@
Perform more validation on events received during atomic gapfill from remote servers, fixing a panic if bad data was persisted by another server and later lazily fetched by us.
-1
View File
@@ -1 +0,0 @@
Redirect URIs in OAuth clients' metadata are now properly validated to be on a subdomain of the OAuth issuer URL domain. Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
Updated internal Sentry integration setup to the new pattern required by the SDK.
-1
View File
@@ -1 +0,0 @@
Fix v12 rooms created by the same user in the same millisecond ending up as the same room. Contributed by @eleboucher.
-1
View File
@@ -1 +0,0 @@
Setting a profile key longer than 255 bytes now returns 400 `M_KEY_TOO_LARGE` as required by the spec, instead of 413 `M_TOO_LARGE`.
-1
View File
@@ -1 +0,0 @@
Setting profile data that would make the profile exceed 64 KiB now returns 400 `M_PROFILE_TOO_LARGE` as required by the spec, instead of a 500 error.
-1
View File
@@ -1 +0,0 @@
Appservices masquerading as a device that does not exist now receive 400 `M_UNKNOWN_DEVICE` as required by the spec, instead of 403 `M_FORBIDDEN`.
-1
View File
@@ -1 +0,0 @@
Setting `m.fully_read` via the account data endpoints now returns 405 `M_BAD_JSON` as required by the spec, instead of 400.
-1
View File
@@ -1 +0,0 @@
The `m.forget_forced_upon_leave` capability now reflects the `forget_forced_upon_leave` config option instead of always being advertised as enabled.
-1
View File
@@ -1 +0,0 @@
Fixed push notifications for membership events setting `user_is_target` based on the sender rather than the user being notified.
@@ -1 +0,0 @@
Added opt-in OpenTelemetry metrics, exported over OTLP or scraped by Prometheus from `/_continuwuity/metrics`, and a Grafana dashboard. Contributed by @eleboucher.
+13 -336
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -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=23
ARG LLVM_VERSION=22
# 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.26.1
ENV BINSTALL_VERSION=1.24.0
# renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree
+1 -1
View File
@@ -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.26.1
ENV BINSTALL_VERSION=1.24.0
# renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree
+18 -74
View File
@@ -1,5 +1,3 @@
import { Tab, Tabs } from '@rspress/core/theme';
# 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.
@@ -14,110 +12,56 @@ An account on the homeserver can only be associated with one OIDC subject claim
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.
The instructions below make the following assumptions:
- Continuwuity's base URL: `https://matrix.example.com`. Note that if you employ [well-known delegation](../guides/delegation), this must match the client well-known domain rather than your server name.
- OIDC provider's base URL: `https://idm.example.com`
### Configuring the OIDC provider
This guide will cover [**Kanidm**][kanidm] and [**Authelia**][authelia], but the basic concepts apply to most identity providers. Contributions for them are welcome.
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.
<Tabs groupId="idp">
<Tab label="KanIDM">
Create a new application for continuwuity in kanidm. We will use `c10y` as the client ID.
First, create a new application for Continuwuity in your identity provider.
```sh
kanidm system oauth2 create c10y Continuwuity https://matrix.example.com
# 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.example.com/_continuwuity/oidc/complete
kanidm system oauth2 add-redirect-url c10y https://matrix.yourdomain.com/_continuwuity/oidc/complete
```
Allow Continuwuity to request the `openid` scope.
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.
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
```
Now the discovery URL for KanIDM is: `https://idm.example.com/oauth2/openid/c10y`
</Tab>
<Tab label="Authelia">
To create a new client in Authelia, it is [recommended][authelia-faq-client-secret] to randomly generate both the client id and client secret. The commands below should get you those:
<Tabs groupId="authelia-generate-client-details">
<Tab label="Bare Binary">
```sh
# Generate random value for Client ID
authelia crypto rand --length 72 --charset rfc3986
# Generate Client Secret (labeled Random Password) and its Digest
authelia crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986
```
</Tab>
<Tab label="Docker">
```sh
# Generate random value for Client ID
docker run --rm authelia/authelia:latest authelia crypto rand --length 72 --charset rfc3986
# Generate Client Secret (labeled Random Password) and its Digest
docker run --rm authelia/authelia:latest authelia crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986
```
</Tab>
</Tabs>
Authelia only needs to know the digest of the secret, whereas Continuwuity requires the secret itself.
Go to your Authelia configuration file, find the `identity_provers` block, and add a block for Continuwuity to the `clients` list:
```yaml
identity_providers:
oidc:
jwks:
# This part has the JWKs and is what you configured previously
# ...
clients:
# Add this block below to the clients list
- client_name: continuwuity
client_id: "client-id-goes-here"
# Use the client secret's DIGEST, not the client secret itself
client_secret: "client-secret-DIGEST-goes-here"
redirect_uris: ["https://matrix.example.com/_continuwuity/oidc/complete"]
scopes: [openid]
```
Then restart Authelia to load the new configuration.
The discovery URL is simply the root domain of your Authelia, where it can be reached by clients, i.e. `https://idm.example.com`.
</Tab>
</Tabs>
[kanidm]: https://kanidm.com
[authelia]: https://www.authelia.com
[authelia-faq-client-secret]: https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#how-do-i-generate-a-client-identifier-or-client-secret
### Configuring Continuwuity
Configure Continuwuity with the client ID, client secret, and discovery URL provided from the steps above.
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://your-discovery-url"
discovery_url = "https://idm.example.com/oauth2/openid/c10y"
client_id = "your-client-id"
client_secret = "your-client-secret"
# 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
+21 -2
View File
@@ -303,14 +303,33 @@ For browser-based clients, you can also inspect connections using DevTools' Netw
### Docker loopback networking issues
Some distros do not allow Docker containers to connect to the host's public IP, and this breaks connections from `lk-jwt-service` towards `livekit` and `continuwuity` if they're on the same host. This can be tested by the following command:
Some distros do not allow Docker containers in bridge networks to connect to their host's public IP by default. This makes `lk-jwt-service` fail connecting to `livekit` or `continuwuity` on the same host, causing refused and timed out connections to appear in the log entries of the JWT service, even when `LIVEKIT_URL` has been configured correctly.
You can also test that this is the case by cURLing from a sidecar container:
```bash
docker run --rm --net container:lk-jwt-service docker.io/curlimages/curl https://livekit.example.com
# --- some errors ---
```
To resolve this, follow the steps in [Docker loopback networking issues](../troubleshooting.mdx#docker-loopback-networking-issues) of the Troubleshooting page.
To resolve this, configure an `extra_hosts` file mapping LiveKit's and Continuwuity's domain names to Docker's custom host loopback address, represented here by `host-gateway`:
```diff
# in docker-compose.yaml
services:
lk-jwt-service:
...
+ extra_hosts:
+ - "livekit.example.com:host-gateway"
+ - "matrix.example.com:host-gateway"
```
After implementing the changes and restarting your compose, `lk-jwt-service` should now connect to your other services. The sidecar container test above should now return an `OK` from LiveKit.
For more information about the `host-gateway` parameter, kindly refer to the `--add-host` documentation for [Docker][docker-add-host] and [Podman][podman-add-host]. Should you have further difficulties, feel free to enquire in the support rooms.
[docker-add-host]: https://docs.docker.com/reference/cli/docker/container/run/#add-host
[podman-add-host]: https://docs.podman.io/en/latest/markdown/podman-run.1.html#add-host-hostname-hostname-ip
### Incorrect IP address for LiveKit
-4
View File
@@ -37,10 +37,6 @@ 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
+1 -1
View File
@@ -99,7 +99,7 @@ After Continuwuity is up and running, consider the following:
- 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.
- See the [**Authentication chapter**] 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.
+17 -58
View File
@@ -53,7 +53,7 @@ For more setups with `.well-known` delegation and split-domain deployments, cons
Docker Compose is the recommended deployment method for Continuwuity containers. The following environment variables will be set:
- `CONTINUWUITY_SERVER_NAME` - Your Matrix server's domain name. **This CANNOT be changed later without a data wipe.**
- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker bind mount.
- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker volume mount.
- `CONTINUWUITY_ADDRESS` - Bind address (for Docker, use `0.0.0.0` to listen on all interfaces).
Alternatively, you can specify a path to mount the configuration file using the `CONTINUWUITY_CONFIG` environment variable.
@@ -89,9 +89,7 @@ Consult the [**DNS tuning guide (recommended)**](../guides/dns.mdx) for full sol
<summary>docker-compose.with-caddy.yml ([view raw](/deploying/docker-compose.with-caddy.yml))</summary>
Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy.
Then, create a Caddyfile with the following content:
Create a Caddyfile with the following content:
```
https://example.com:443, https://example.com:8448 {
@@ -99,7 +97,7 @@ https://example.com:443, https://example.com:8448 {
}
```
Then, for the docker compose file:
Then, for the docker-compose:
```yaml file="../public/deploying/docker-compose.with-caddy.yml"
@@ -112,10 +110,6 @@ Then, for the docker compose file:
<details>
<summary>docker-compose.with-caddy-labels.yml ([view raw](/deploying/docker-compose.with-caddy-labels.yml))</summary>
Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy.
Then, for the docker compose file:
```yaml file="../public/deploying/docker-compose.with-caddy-labels.yml"
```
@@ -138,10 +132,6 @@ Then, for the docker compose file:
<details>
<summary>docker-compose.with-traefik.yml ([view raw](/deploying/docker-compose.with-traefik.yml))</summary>
Create a directory called `traefik-acme-data`, which will store TLS certs obtained by Caddy.
Then, for the docker compose file:
```yaml file="../public/deploying/docker-compose.with-traefik.yml"
```
@@ -174,15 +164,10 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio
### Starting Your Server
1. Create a directory named `continuwuity-data`. This will be where your server's database lives.
2. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit.
- Follow all extra instructions as needed.
- If using the override file, rename it to `docker-compose.override.yml` and edit your values.
3. Start the server with the following command:
1. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit.
2. If using the override file, rename it to `docker-compose.override.yml` and
edit your values.
3. Start the server:
```bash
docker compose up -d
@@ -204,7 +189,9 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio
Pick your own username and password!
```
5. Log in to your server with any Matrix client, and register for an account with the registration token from the previous step. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin).
5. Log in to your server with any Matrix client, and register for an account with the registration token from step 4. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin).
See the [generic deployment guide](generic.mdx) for more deployment options.
## Testing
@@ -212,9 +199,7 @@ Test that your setup works by following these [instructions](./generic.mdx#how-d
Check your container logs using `docker-compose logs --follow` to debug any issues. See the [Troubleshooting](../troubleshooting.mdx) page for common errors and how to fix them.
## Maintenance
### Updating
## Updating
To update to a new version of Continuwuity, use the following commands:
@@ -227,10 +212,6 @@ docker compose pull
docker compose up -d
```
### Backups
The database in `./continuwuity-data` is present on the host system as a regular directory, and therefore can be backed up using normal mechanisms. See the [Backup](../maintenance.mdx#backups) section of the Maintenance page for more details.
## What's next?
Navigate to [Post-installation](../deploying.mdx#post-installation) for next steps.
@@ -289,6 +270,12 @@ Get a working Continuwuity server with an admin user in four steps:
Once configured, log in to your server with any Matrix client, and register for an account with the registration token from step 3. If you did not configure step 4., log in via the `http://<your_server_ip>:8008` address. You will be automatically invited to the admin room where you can [manage your server](../reference/admin).
### (Optional) Building Custom Images
For information on building your own Continuwuity Docker images, see the
[Building Docker Images](../development/index.mdx#building-docker-images)
section in the development documentation.
### Accessing the Server's Console
Before you can access the server's console and [send admin commands](../reference/admin/index.md) from the CLI, you will need to make the container interactive and allocate a pseudo-tty. Make sure you set `admin_console_automatic` to `true` in [the config](../reference/config.mdx) as well for Continuwuity to activate the CLI on startup.
@@ -310,31 +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/
### Using Docker volumes
The example compose files above utilizes [bind mounts][docker-bind-mounts]. If you want to use [Docker volumes][docker-volumes] instead, apply these changes to your compose file:
```diff
services:
continuwuity:
# ...
volumes:
- - ./continuwuity-data:/var/lib/continuwuity
+ - continuwuity-data:/var/lib/continuwuity
+volumes:
+ continuwuity-data:
```
Consult the [Docker docs][docker-volumes-backup-restore] for details on backing up and restoring Docker volumes
[docker-bind-mounts]: https://docs.docker.com/engine/storage/bind-mounts/
[docker-volumes]: https://docs.docker.com/engine/storage/volumes/
[docker-volumes-backup-restore]: https://docs.docker.com/engine/storage/volumes/#back-up-restore-or-migrate-data-volumes
### Building Custom Images
For information on building your own Continuwuity Docker images, see the
[Building Docker Images](../development/index.mdx#building-docker-images)
section in the development documentation.
-5
View File
@@ -199,11 +199,6 @@ header, making federation non-functional. If you find a workaround, please share
Furthermore, Nginx users need to increase the `client_max_body_size` setting (default is 1M) to match the `max_request_size` defined in conduwuit.toml.
- For HAProxy, ensure that the ACL for the `Host` header matches both the domain and the domain with the port, as federation requests are often sent with the port included. This can be done by using the `host_only` directive:
```
acl matrix-host hdr(host),host_only -i example.com
```
## Starting Your Server
Now you can start Continuwuity with:
+1 -1
View File
@@ -79,7 +79,7 @@ spec:
value: "https://matrix.example.com"
- name: CONTINUWUITY_ALLOW_REGISTRATION
value: "false"
- name: CONTINUWUITY_LOG
- name: RUST_LOG
value: info
readinessProbe:
httpGet:
-10
View File
@@ -13,15 +13,5 @@
"type": "file",
"name": "performance",
"label": "Performance tuning"
},
{
"type": "file",
"name": "metrics",
"label": "Metrics"
},
{
"type": "file",
"name": "push",
"label": "Push notifications"
}
]
-100
View File
@@ -1,100 +0,0 @@
# 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.
+2 -2
View File
@@ -113,7 +113,7 @@ https://matrix.example.com {
### Tuning your trusted servers
:::important Important: Vet your trusted servers!
:::info Vet your trusted servers!
Trusted servers are your first point of contact when obtaining public keys from other servers, and they could theoretically impersonate other servers and cause significant harm to your deployment. Please thoroughly verify your trusted servers' credibility before adding them to your configuration.
If you need suggestions for trusted servers, ask in the Continuwuity main room.
@@ -128,7 +128,7 @@ trusted_servers = ["codestorm.net","starstruck.systems","unredacted.org","matrix
Avoid prioritising `matrix.org` as your primary trusted server, as it tends to be quite slow.
Some users have also reported that increasing `trusted_server_batch_size` helps with faster joins for huge rooms. Start with doubling the default to `2048` until you find a suitable value.
Some users have also reported that increasing `trusted_server_batch_size` has helped with faster joins for huge rooms. Start with doubling the default to `2048` until you find a suitable value.
### Enable HTTP/3 on your reverse proxy
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

-215
View File
@@ -1,215 +0,0 @@
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/
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -12,7 +12,7 @@ services:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./caddy-data:/data
- ./data:/data
restart: unless-stopped
labels:
caddy: example.com
@@ -23,7 +23,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -46,5 +46,8 @@ services:
caddy: matrix.example.com
caddy.reverse_proxy: "{{upstreams 8008}}"
volumes:
db:
networks:
proxy:
@@ -9,7 +9,7 @@ services:
networks:
- caddy
volumes:
- ./caddy-data:/data
- ./data:/data
# mount your created Caddyfile into the container
- ./Caddyfile:/etc/caddy/Caddyfile
restart: unless-stopped
@@ -19,7 +19,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -41,3 +41,6 @@ services:
networks:
proxy:
volumes:
db:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -40,7 +40,7 @@ services:
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik-acme-data:/etc/traefik/acme"
- "acme:/etc/traefik/acme"
labels:
- "traefik.enable=true"
@@ -77,5 +77,9 @@ services:
TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock"
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
volumes:
db:
acme:
networks:
proxy:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -18,7 +18,7 @@ services:
- "traefik.http.routers.continuwuity.tls=true"
- "traefik.http.routers.continuwuity.service=continuwuity"
- "traefik.http.services.continuwuity.loadbalancer.server.port=8008"
# enable tls with the `letsencrypt` certificate resolver (actual name dependant on your static config)
# possibly, depending on your config:
# - "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt"
environment:
CONTINUWUITY_SERVER_NAME: example.com
@@ -34,6 +34,9 @@ services:
server=example.com:443
}
volumes:
db:
networks:
# This must match the network name that Traefik listens on
proxy:
@@ -12,7 +12,7 @@ services:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./caddy-data:/data
- ./data:/data
restart: unless-stopped
homeserver:
@@ -20,7 +20,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -10,7 +10,7 @@ services:
networks:
- proxy
volumes:
- ./caddy-data:/data
- ./data:/data
# mount your created Caddyfile into the container
- ./Caddyfile:/etc/caddy/Caddyfile
restart: unless-stopped
@@ -20,7 +20,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -43,3 +43,6 @@ services:
networks:
proxy:
volumes:
db:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -40,7 +40,7 @@ services:
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik-acme-data:/etc/traefik/acme"
- "acme:/etc/traefik/acme"
labels:
- "traefik.enable=true"
@@ -77,5 +77,9 @@ services:
TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock"
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
volumes:
db:
acme:
networks:
proxy:
+33 -30
View File
@@ -1,38 +1,41 @@
# Continuwuity - Bare Configuration (for other reverse proxies)
services:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
ports:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
ports:
# If your reverse proxy is on the host, use this
# and configure it to connect to `127.0.0.1:8008`
- 127.0.0.1:8008:8008
# If your reverse proxy is on the host, use this
# and configure it to connect to `127.0.0.1:8008`
- 127.0.0.1:8008:8008
# If your reverse proxy is on another machine, use this
# and configure it to connect to <this-machine-ip>:8008
# - 8008:8008
# If your reverse proxy is on another machine, use this
# and configure it to connect to <this-machine-ip>:8008
# - 8008:8008
# If your reverse proxy is a docker container on the same network,
# comment out the entire `ports` section, and configure it to connect to `continuwuity:8008`
# If your reverse proxy is a docker container on the same network,
# comment out the entire `ports` section, and configure it to connect to `continuwuity:8008`
volumes:
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443
## If you do this, remove all routes to port :8448 on your reverse proxy
# CONTINUWUITY_WELL_KNOWN: |
# {
# client=https://example.com,
# server=example.com:443
# }
## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443
## If you do this, remove all routes to port :8448 on your reverse proxy
# CONTINUWUITY_WELL_KNOWN: |
# {
# client=https://example.com,
# server=example.com:443
# }
volumes:
db:
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+17 -87
View File
@@ -1,9 +1,9 @@
# Troubleshooting Continuwuity
:::warning{title="For Docker users"}
It's common for Docker misconfigurations to cause issues, particularly with networking and
permissions. Before continuing, please first check that your issues are notdue Docker
problems. See the dedicated [**Docker issues**](#docker-issues) section for more details.
:::warning{title="Docker users:"}
Docker can be difficult to use and debug. It's common for Docker
misconfigurations to cause issues, particularly with networking and permissions.
Please check that your issues are not due to problems with your Docker setup.
:::
## Continuwuity issues
@@ -13,9 +13,9 @@ problems. See the dedicated [**Docker issues**](#docker-issues) section for more
Some slowness is to be expected if you're the first person on your homeserver to join a room (which will
always be the case for single-user homeservers). In this situation, your homeserver has to verify the signatures of
all of the state events sent by other servers before your join. To make this process as fast as possible, make sure you have
multiple fast, trusted servers listed in `trusted_servers` in your configuration, and ensure
`query_trusted_key_servers_first_on_join` is set to true (the default). Read the
[Tuning your trusted servers](./guides/performance.mdx#tuning-your-trusted-servers) section for more details on doing so.
[multiple fast, trusted servers](./guides/performance.mdx#tuning-your-trusted-servers) listed in `trusted_servers` in your configuration, and ensure
`query_trusted_key_servers_first_on_join` is set to true (the default).
If you need suggestions for trusted servers, ask in the Continuwuity main room.
However, _very_ slow joins, especially to rooms with only a few users in them or rooms created by another user
on your homeserver, may be caused by [issue !779](https://forgejo.ellis.link/continuwuation/continuwuity/issues/779),
@@ -119,63 +119,11 @@ much possible corruption is restored
- If all goes will, you should be able to restore back to using
`TolerateCorruptedTailRecords` and you have successfully recovered your database
## Docker issues
### Debugging Docker networking
The Continuwuity image does not ship with any shell or internal debugging utilities. To debug network conditions for Continuwuity, run another sidecar container that is attached to its network namespace. For example, using the `curl` container:
```bash
docker run --rm -it \
--network container:continuwuity \
docker.io/curlimages/curl \
curl https://continuwuity.org/.well-known/matrix/server
```
### Docker loopback networking issues
Some distros disallow Docker containers in bridge networks to reach out to their host's public IP by default. This can cause connectivity issues between Continuwuity and other services that are on the same host machine, such as LiveKit or a push server.
One can test if this is the case by cURLing those services with a sidecar container:
```bash
docker run --rm -it --network container:continuwuity docker.io/curlimages/curl curl https://push.example.com
# --- some timeout or refused connection errors ---
```
To fix this, use the `extra_hosts` parameter to map local service domains to `host-gateway` - a special Docker value that resolves to the internal IP address of the host.
```diff title="docker-compose.yaml"
services:
continuwuity:
...
# allow Continuwuity to reach out to the push server and livekit
# via the host gateway loopback address
+ extra_hosts:
+ - "push.example.com:host-gateway"
+ - "livekit.example.com:host-gateway"
lk-jwt-service:
...
# allow jwt service to reach out to Continuwuity and livekit
# via the host gateway loopback address
+ extra_hosts:
+ - "livekit.example.com:host-gateway"
+ - "matrix.example.com:host-gateway"
```
Reload the compose file, and connections between these services (as well as the sidecar container test above) should now work.
For more information about the `host-gateway` parameter, kindly consult the Docker docs on [custom DNS with `extra_hosts`][docker-custom-dns] and the [`--add-host` option][docker-add-host].
[docker-custom-dns]: https://docs.docker.com/compose/how-tos/networking/#custom-dns-with-extra_hosts
[docker-add-host]: https://docs.docker.com/reference/cli/docker/container/run/#add-host
## Debugging
Note that users should not really need to debug things. If you find yourself
debugging and find the issue, please let us know and/or how we can fix it.
Various debug commands can be found in [`!admin debug`](./reference/admin/debug).
Various debug commands can be [found in `!admin debug`](./reference/admin/debug).
### Debug/Trace log level
@@ -188,34 +136,23 @@ you need to access debug/trace log levels, you will need to build without the
Continuwuity supports changing the tracing log environment filter on-the-fly using
the admin command `!admin debug change-log-level <log env filter>`. This accepts
a string **without quotes** in the same format as the `log` config option. Complex
filters are also supported as well.
a string **without quotes** the same format as the `log` config option.
```bash
# set log level to debug
!admin debug change-log-level debug
Example: `!admin debug change-log-level debug`
# trace logs for all outgoing federation to `example.com`
!admin debug change-log-level info,conduwuit_service::federation[{dest="example.com"}]=trace
This can also accept complex filters such as:
`!admin debug change-log-level info,conduit_service[{dest="example.com"}]=trace,ruma_state_res=trace`
`!admin debug change-log-level info,conduit_service[{dest="example.com"}]=trace,conduit_service[send{dest="example.org"}]=trace`
# trace logs for client syncs
!admin debug change-log-level info,conduwuit_api::client=trace
And to reset the log level to the one that was set at startup / last config
load, simply pass the `--reset` flag.
# debug logs for everything except h2 and presence
!admin debug change-log-level trace,h2=off,conduwuit_service::presence=off
```
To reset the log level to the one that was set at last config
load, simply do:
```bash
!admin debug change-log-level --reset
```
`!admin debug change-log-level --reset`
### Pinging servers
Continuwuity can ping other servers using `!admin debug ping <server>`. This takes
a server name, goes through the server discovery process, and queries
a server name and goes through the server discovery process and queries
`/_matrix/federation/v1/version`. Errors are outputted.
While it does measure the latency of the request, it is not indicative of
@@ -261,10 +198,3 @@ and is not easy for non-developers to understand.
[unbound-tuning]: https://unbound.docs.nlnetlabs.nl/en/latest/topics/core/performance.html
[unbound-arch]: https://wiki.archlinux.org/title/Unbound
## Other troubleshooting topics
- [LiveKit troubleshooting](./calls/livekit.mdx#troubleshooting)
- [TURN server troubleshooting](./calls/turn.mdx#troubleshooting)
- [Delegation/split-domain troubleshooting](./guides/delegation.mdx#troubleshooting)
- [Push notifications troubleshooting](./guides/push.mdx#troubleshooting)
+1 -1
View File
@@ -12,7 +12,7 @@
target:
target.fromToolchainName {
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
sha256 = "sha256-+xUr6Al1wZSqX8aEsq7DpuFOK4Ve/i+qTl+K5uWQ9GM=";
sha256 = "sha256-p8h3Sl/YRByZfZTAKXdsvF6xEenXKrXSVvpphmZENH4=";
};
in
{
+90 -90
View File
@@ -125,13 +125,13 @@
}
},
"node_modules/@rsbuild/core": {
"version": "2.2.11",
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.2.11.tgz",
"integrity": "sha512-avPW0j6RaEbtV2mfl0AzTAJEimPX4Xj0pCcZyxNCrE9vkS91HmweM5V7XQj3kI5iTYfHRp9Y6To8RRHYLEvG7A==",
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.2.5.tgz",
"integrity": "sha512-nf34ri1iZduYhHUr5Vc79L7Eml+IlN0nFIaF/g3OW4WR/gShxuf5wVXS69/H8FTHJYN4SdYlNcefSZQluEMKgA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rspack/core": "~2.2.8",
"@rspack/core": "~2.2.3",
"@swc/helpers": "^0.5.23"
},
"bin": {
@@ -169,32 +169,32 @@
}
},
"node_modules/@rspack/binding": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.2.8.tgz",
"integrity": "sha512-c9flkSua3khHnOKBCRk8BkHGOwU9YB7niv+5JfQXiLZIvJmgKsZ7PD8QrFklMhsJT3oVAc6c9GN7/wy1YkACjA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.2.3.tgz",
"integrity": "sha512-532+T5N6yIdukChiL85H4NFN2vn9oi8wlLa1ByPNtpNYriE9s24fUhn0RiK7w/xACqnNpYmXCqLYCvjOzyCy+w==",
"dev": true,
"license": "MIT",
"optionalDependencies": {
"@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"
"@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"
}
},
"node_modules/@rspack/binding-darwin-arm64": {
"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==",
"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==",
"cpu": [
"arm64"
],
@@ -206,9 +206,9 @@
]
},
"node_modules/@rspack/binding-darwin-x64": {
"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==",
"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==",
"cpu": [
"x64"
],
@@ -220,9 +220,9 @@
]
},
"node_modules/@rspack/binding-linux-arm64-gnu": {
"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==",
"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==",
"cpu": [
"arm64"
],
@@ -237,9 +237,9 @@
]
},
"node_modules/@rspack/binding-linux-arm64-musl": {
"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==",
"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==",
"cpu": [
"arm64"
],
@@ -254,9 +254,9 @@
]
},
"node_modules/@rspack/binding-linux-ppc64-gnu": {
"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==",
"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==",
"cpu": [
"ppc64"
],
@@ -271,9 +271,9 @@
]
},
"node_modules/@rspack/binding-linux-riscv64-gnu": {
"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==",
"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==",
"cpu": [
"riscv64"
],
@@ -288,9 +288,9 @@
]
},
"node_modules/@rspack/binding-linux-riscv64-musl": {
"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==",
"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==",
"cpu": [
"riscv64"
],
@@ -305,9 +305,9 @@
]
},
"node_modules/@rspack/binding-linux-s390x-gnu": {
"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==",
"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==",
"cpu": [
"s390x"
],
@@ -322,9 +322,9 @@
]
},
"node_modules/@rspack/binding-linux-x64-gnu": {
"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==",
"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==",
"cpu": [
"x64"
],
@@ -339,9 +339,9 @@
]
},
"node_modules/@rspack/binding-linux-x64-musl": {
"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==",
"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==",
"cpu": [
"x64"
],
@@ -356,9 +356,9 @@
]
},
"node_modules/@rspack/binding-wasm32-wasi": {
"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==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.2.3.tgz",
"integrity": "sha512-gici3jWJi0GDy9kbYh57LoA57H8A2EAD9cV2jFKp1YoJ2aX2U9lANh4L+xoKPTvVQYpRvleoA5jkAvyfeLQ5bw==",
"cpu": [
"wasm32"
],
@@ -372,9 +372,9 @@
}
},
"node_modules/@rspack/binding-win32-arm64-msvc": {
"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==",
"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==",
"cpu": [
"arm64"
],
@@ -386,9 +386,9 @@
]
},
"node_modules/@rspack/binding-win32-ia32-msvc": {
"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==",
"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==",
"cpu": [
"ia32"
],
@@ -400,9 +400,9 @@
]
},
"node_modules/@rspack/binding-win32-x64-msvc": {
"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==",
"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==",
"cpu": [
"x64"
],
@@ -414,13 +414,13 @@
]
},
"node_modules/@rspack/core": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.2.8.tgz",
"integrity": "sha512-JugsVrnbMGNYzMH++7gR9enygpP/lAo9PbVRq3XmJg0ryIvCpST0XJjBcccaSjYaaPamsjrddihmgVLMFp+yXw==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.2.3.tgz",
"integrity": "sha512-VHejw+PDd5B5v6VduFyjLSTIFaHBMNGPMKw+Y0zjkMqjYhDD1hjLOBC5frRKjTWcfYdk+Q73auWPp9k/H9PfIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rspack/binding": "2.2.8"
"@rspack/binding": "2.2.3"
},
"engines": {
"node": "^20.19.0 || >=22.12.0"
@@ -455,17 +455,17 @@
}
},
"node_modules/@rspress/core": {
"version": "2.0.23",
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.23.tgz",
"integrity": "sha512-two8zdTxN9iJBSyiFXwRLLDXz/yLY2+4ycz8wHjJYzeeuFi/EN2eqsKw1nSpY7sxEGIssY1X74c6017JJUBTyA==",
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.22.tgz",
"integrity": "sha512-mS/+xJYxVSR72GAjTz8GIGcJwwb2NSbbduq1fQOSv7k73EJ2aa0Q/o14nnnI4DRmRSEmK0t81vkVGcKHWQzPcA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@mdx-js/mdx": "^3.1.1",
"@mdx-js/react": "^3.1.1",
"@rsbuild/core": "^2.2.10",
"@rsbuild/core": "^2.2.5",
"@rsbuild/plugin-react": "~2.1.0",
"@rspress/shared": "2.0.23",
"@rspress/shared": "2.0.22",
"@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.4",
"react-router-dom": "^7.18.3",
"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.23",
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.23.tgz",
"integrity": "sha512-TdpvO3TREv6s2mE32ztFvG3P232qUwjyQCKKsb9g0XT0q7rzcStZFRE7XT/L8i0XTzH/mfli1tVl4guTea/J3Q==",
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.22.tgz",
"integrity": "sha512-pyOLIfxji1xbh//H0egdmhXVdO5hfp9dLXCTnZKcet9K3FJpre21/syuhRbRwWviMpcKtE73PZVcSaNVTYQYZw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -521,9 +521,9 @@
}
},
"node_modules/@rspress/plugin-sitemap": {
"version": "2.0.23",
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.23.tgz",
"integrity": "sha512-r37TvCP2wuQX8JbA7hHti8JXhVx4HiaJPn702NgFhGyolGJYIUTRQCO2/ixiP1FZJuxZ4c0yb4ZyNeDa9ZPMlw==",
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.22.tgz",
"integrity": "sha512-2SNLW8Oh4osCyqnzea1WDVA9469Luwu0piNuh5HNjlzcgjguzynA3447WRFpqBL1Z/B7H5IB5SMcwYaMsgFhvQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -534,13 +534,13 @@
}
},
"node_modules/@rspress/shared": {
"version": "2.0.23",
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.23.tgz",
"integrity": "sha512-kE2GXRCQ7GAl2wll1JBWRHEkZICKcWv3V86m8TkjiWb0eEdjACl3kns7j00KTq4UbE35kUPOs+0Lx8vGqK7q9w==",
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.22.tgz",
"integrity": "sha512-1UXwG6gAhWBw5vClv3wb2Oy8hPXYNgQwQ5zWXEG8auY5ZcMywvHCBi6pFJtYNOgXe5327lNgiOG0S1R8l0OLeg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rsbuild/core": "^2.2.10",
"@rsbuild/core": "^2.2.5",
"@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.4",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.4.tgz",
"integrity": "sha512-PUPQcMhMGRAslLcvtlPz/kmzBEWPhLdgLFrL7pLNepBL6dX0lWj4WD2cUYVgYCuT3jxvghYFg81cDTj44DhetQ==",
"version": "7.18.3",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.3.tgz",
"integrity": "sha512-gyXgtdr5uACJ5b1Q4udzjVV+tb/rlHIMJKuJ0e89R4Kzgz47z/rgP0dIKxktqIEUhDHluGTPJJH/wRha7CyqsA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3311,13 +3311,13 @@
}
},
"node_modules/react-router-dom": {
"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==",
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
"react-router": "7.18.4"
"react-router": "7.18.3"
},
"engines": {
"node": ">=20.0.0"
-4
View File
@@ -18,8 +18,6 @@ export default defineConfig({
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',
@@ -33,8 +31,6 @@ export default defineConfig({
'/advanced/delegated.docker-compose.with-traefik.yml',
'/calls/livekit.docker-compose.with-caddy-labels.yml',
'/calls/livekit.nginx.conf',
'/guides/grafana-dashboard.json',
'/guides/push-notifications.excalidraw',
'CONTRIBUTING.md'
]
},
+1 -1
View File
@@ -10,7 +10,7 @@
[toolchain]
profile = "minimal"
channel = "1.99.1"
channel = "1.98.1"
components = [
# For rust-analyzer
"rust-src",
+8 -6
View File
@@ -1,4 +1,4 @@
use conduwuit::{Err, Result, checked, utils::ReadyExt};
use conduwuit::{Err, Result, checked};
use futures::{FutureExt, StreamExt, TryFutureExt};
impl crate::Context<'_> {
@@ -49,6 +49,7 @@ impl crate::Context<'_> {
.services
.appservice
.get_registration(&appservice_identifier)
.await
{
| None => return Err!("Appservice does not exist."),
| Some(config) => {
@@ -77,11 +78,12 @@ impl crate::Context<'_> {
self.services
.users
.stream_local_users()
.ready_filter_map(|user_id| {
self.services
.appservice
.is_user_id(&user_id)
.then_some(user_id)
.filter_map(async |user_id| {
if self.services.appservice.is_user_id(&user_id).await {
Some(user_id)
} else {
None
}
})
.for_each(async |user_id| {
self.services
+1 -41
View File
@@ -14,7 +14,7 @@ use conduwuit::{
state_res::EventTypeExt,
trace, utils,
utils::{
stream::{BroadbandExt, IterStream, ReadyExt},
stream::{IterStream, ReadyExt},
string::EMPTY,
to_canonical_object,
},
@@ -1207,46 +1207,6 @@ impl crate::Context<'_> {
.await
}
pub(super) async fn room_extremities(&self, room_id: OwnedRoomId) -> Result {
let mut extremities = self
.services
.rooms
.state
.get_forward_extremities(&room_id)
.broad_filter_map(|event_id| async move {
self.services.rooms.timeline.get_pdu(&event_id).await.ok()
})
.collect::<Vec<_>>()
.await;
extremities.sort_by_key(|pdu| (pdu.depth, pdu.origin_server_ts));
if extremities.is_empty() {
return Err!("No room extremities.");
}
self.write_str("| Event ID | Kind | Sender | Timestamp | Depth |\n")
.await?;
self.write_str("| -------- | ---- | ------ | --------- | ----- |\n")
.await?;
for pdu in extremities {
let url = format!(
"https://matrix.to/#/{}/{}?via={}",
room_id,
pdu.event_id(),
self.services.server.name
);
self.write_str(&format!(
"| [`{}`]({url}) | `{}` | `{}` | `{}` | `{}` |\n",
pdu.event_id(),
pdu.kind(),
pdu.sender(),
pdu.origin_server_ts,
pdu.depth
))
.await?;
}
Ok(())
}
pub(super) async fn servers_in_backoff(
&self,
room_id: Option<OwnedRoomId>,
-4
View File
@@ -234,10 +234,6 @@ pub enum DebugCommand {
page: Option<usize>,
},
RoomExtremities {
room_id: OwnedRoomId,
},
/// Lists remote servers that are currently in a "backoff" state.
///
/// Servers in this list will not be contacted until the retry time elapses,
+8 -4
View File
@@ -39,13 +39,17 @@ conduwuit::mod_dtor! {}
pub use crate::admin::AdminCommand;
/// Install the admin command processor
pub fn init(admin_service: &service::admin::Service) {
pub async fn init(admin_service: &service::admin::Service) {
_ = admin_service.complete.write().insert(processor::complete);
_ = admin_service.handle.write().insert(processor::dispatch);
_ = admin_service
.handle
.write()
.await
.insert(processor::dispatch);
}
/// Uninstall the admin command handler
pub fn fini(admin_service: &service::admin::Service) {
_ = admin_service.handle.write().take();
pub async fn fini(admin_service: &service::admin::Service) {
_ = admin_service.handle.write().await.take();
_ = admin_service.complete.write().take();
}
+1 -1
View File
@@ -24,7 +24,7 @@ pub(super) async fn process(subcommand: AppserviceCommand, context: &Context<'_>
match subcommand {
| AppserviceCommand::GetRegistration { appservice_id } => {
let timer = tokio::time::Instant::now();
let results = services.appservice.get_registration(&appservice_id);
let results = services.appservice.get_registration(&appservice_id).await;
let query_time = timer.elapsed();
+8 -30
View File
@@ -31,36 +31,14 @@ 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,
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());
}
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;
let mut plain_msg = format!("Found {} local user account(s):\n```\n", users.len());
plain_msg += users.join("\n").as_str();
+1 -11
View File
@@ -164,17 +164,7 @@ pub enum UserCommand {
/// List local users in the database
#[command(name = "list", alias = "list-users")]
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,
},
ListUsers,
/// Lists all the rooms (local and remote) that the specified user is
/// invited to
+1
View File
@@ -1 +1,2 @@
pub mod rooms;
pub mod users;
+1 -1
View File
@@ -6,7 +6,7 @@ use ruminuwuity::admin::continuwuity::rooms;
use crate::{Ruma, client::leave_room};
/// # `PUT /_continuwuity/admin/rooms/{roomID}/ban`
/// # `PUT /_continuwuity/admin/v1/rooms/{roomID}/ban`
///
/// Bans or unbans a room.
pub(crate) async fn ban_room(
+1 -1
View File
@@ -6,7 +6,7 @@ use ruminuwuity::admin::continuwuity::rooms;
use crate::Ruma;
/// # `GET /_continuwuity/admin/rooms/list`
/// # `GET /_continuwuity/admin/v1/rooms/list`
///
/// Lists all rooms known to this server, excluding banned ones.
pub(crate) async fn list_rooms(
+69
View File
@@ -0,0 +1,69 @@
use axum::extract::State;
use conduwuit::{Err, error};
use ruma::{api::client::profile::PropagateTo, profile::ProfileFieldValue};
use ruminuwuity::admin::continuwuity::users::create::v1::{Request, Response};
use service::users::{HashedPassword, ProfileFieldChange};
use crate::router::Ruma;
/// # `POST /_continuwuity/admin/v1/users`
///
/// Creates a new user on the homeserver.
pub(crate) async fn create_user(
State(services): State<crate::State>,
body: Ruma<Request>,
) -> conduwuit::Result<Response> {
let sender_user = body.identity.expect_sender_user()?;
if !services.users.is_admin(sender_user).await {
return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
}
if !services.globals.user_is_local(&body.user_id) {
return Err!(Request(InvalidParam("User ID does not belong to this server.")));
}
if services.users.status(&body.user_id).await.is_found() {
return Err!(Request(UserInUse("An account with this user ID already exists.")));
}
services
.users
.create_local_account(
&body.user_id,
body.password
.as_ref()
.and_then(|raw| HashedPassword::new(raw).ok()),
None,
None,
None,
)
.await?;
if body.locked {
services
.users
.lock_account(&body.user_id, sender_user)
.await;
}
if body.suspended {
services
.users
.suspend_account(&body.user_id, sender_user)
.await;
}
for (key, value) in body.profile.clone().unwrap_or_default() {
services
.users
.set_profile_field(
&body.user_id,
ProfileFieldChange::Set(ProfileFieldValue::new(&key, value)?),
PropagateTo::All,
)
.await
.inspect_err(|e| error!(error=?e, %key, "Failed to set profile field"))
.ok();
}
if body.admin {
services.admin.make_user_admin(&body.user_id).await?;
}
Ok(Response::default())
}
+99
View File
@@ -0,0 +1,99 @@
use std::collections::BTreeMap;
use axum::extract::State;
use conduwuit::{
Err,
utils::{TryFutureExtExt, stream::WidebandExt},
};
use futures::StreamExt;
use ruminuwuity::admin::continuwuity::users::list::v1::{QueryFilter, Request, Response, User};
use service::users::AccountStatus;
use crate::router::Ruma;
/// # `GET /_continuwuity/admin/v1/users`
///
/// Lists users on this homeserver
pub(crate) async fn list_users(
State(services): State<crate::State>,
body: Ruma<Request>,
) -> conduwuit::Result<Response> {
if !services
.users
.is_admin(body.identity.expect_sender_user()?)
.await
{
return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
}
let limit = body.limit.unwrap_or(100);
let offset = limit.saturating_mul(body.page.unwrap_or_default());
let users = services
.users
.stream_local_users()
.wide_filter_map(|user_id| {
let body = &body;
async move {
let status = services.users.status(&user_id).await;
assert_ne!(
status,
AccountStatus::NotFound,
"Not found users should not appear in stream_local_users"
);
let (deactivated, locked, suspended, admin) = tokio::join!(
std::future::ready(status == AccountStatus::Deactivated),
services.users.is_locked(&user_id).unwrap_or_default(),
services.users.is_suspended(&user_id).unwrap_or_default(),
services.users.is_admin(&user_id),
);
// Exclude deactivated accounts by default
if !deactivated && body.active == Some(QueryFilter::Exclude) {
return None;
}
if deactivated
&& body
.deactivated
.as_ref()
.is_none_or(|d| *d == QueryFilter::Include)
{
return None;
}
// Exclude locked accounts by default
if locked && body.locked != Some(QueryFilter::Include) {
return None;
}
// Include suspended accounts by default
if suspended && body.suspended == Some(QueryFilter::Exclude) {
return None;
}
// Include admins by default
if admin && body.admin == Some(QueryFilter::Exclude) {
return None;
}
Some((user_id, deactivated, suspended, locked, admin))
}
})
.skip(offset)
.wide_then(|(user_id, deactivated, suspended, locked, admin)| async move {
let (displayname, avatar_url) = tokio::join!(
services.users.displayname(&user_id).ok(),
services.users.avatar_url(&user_id).ok(),
);
let user = User {
displayname,
avatar_url,
suspended,
locked,
deactivated,
admin,
};
(user_id, user)
})
.take(limit)
.collect::<BTreeMap<_, _>>()
.await;
Ok(Response::new(users))
}
+3
View File
@@ -0,0 +1,3 @@
pub mod create;
pub mod list;
pub mod rooms;
+134
View File
@@ -0,0 +1,134 @@
use axum::extract::State;
use conduwuit::{
Err, Event, at,
utils::{IterStream, ReadyExt, TryFutureExtExt, stream::WidebandExt},
};
use futures::StreamExt;
use ruma::events::room::member::MembershipState;
use ruminuwuity::admin::continuwuity::users::rooms::v1::{Request, Response, RoomInfo};
use serde::Deserialize;
use crate::router::Ruma;
/// # `GET /_continuwuity/admin/v1/users/{user_id}/rooms`
///
/// Lists the memberships of a user on this server.
pub(crate) async fn list_user_rooms(
State(services): State<crate::State>,
body: Ruma<Request>,
) -> conduwuit::Result<Response> {
if !services
.users
.is_admin(body.identity.expect_sender_user()?)
.await
{
return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
}
let limit = body.limit.unwrap_or(100).try_into()?;
let offset = body
.limit
.unwrap_or(100)
.saturating_mul(body.page.unwrap_or_default())
.try_into()?;
let room_ids: Vec<_> = match body.state {
| MembershipState::Join =>
services
.rooms
.state_cache
.rooms_joined(&body.user_id)
.skip(offset)
.take(limit)
.collect()
.await,
| MembershipState::Invite =>
services
.rooms
.state_cache
.rooms_invited(&body.user_id)
.skip(offset)
.take(limit)
.map(at!(0))
.collect()
.await,
| MembershipState::Knock =>
services
.rooms
.state_cache
.rooms_knocked(&body.user_id)
.skip(offset)
.take(limit)
.map(at!(0))
.collect()
.await,
| MembershipState::Leave =>
services
.rooms
.state_cache
.rooms_left(&body.user_id)
.skip(offset)
.take(limit)
.ready_filter_map(|(room_id, pdu)| {
pdu.is_some_and(|pdu| {
pdu.get_content::<ExtractMembership>()
.expect("membership PDU must have a membership field")
.membership
== MembershipState::Leave
})
.then_some(room_id)
})
.collect()
.await,
| MembershipState::Ban =>
services
.rooms
.state_cache
.rooms_left(&body.user_id)
.skip(offset)
.take(limit)
.ready_filter_map(|(room_id, pdu)| {
pdu.is_some_and(|pdu| {
pdu.get_content::<ExtractMembership>()
.expect("membership PDU must have a membership field")
.membership
== MembershipState::Ban
})
.then_some(room_id)
})
.collect()
.await,
| _ => return Err!(Request(InvalidParam("Unknown membership kind: {:?}", body.state))),
};
let resp = room_ids
.into_iter()
.stream()
.wide_then(|room_id| async move {
let (name, avatar, alias, members) = tokio::join!(
services.rooms.state_accessor.get_name(&room_id).ok(),
services.rooms.state_accessor.get_avatar(&room_id),
services
.rooms
.state_accessor
.get_canonical_alias(&room_id)
.ok(),
services.rooms.state_cache.room_members(&room_id).count(),
);
(room_id, RoomInfo {
name,
avatar_url: avatar.into_option().and_then(|a| a.url),
canonical_alias: alias,
member_count: members.try_into().unwrap_or(0),
})
})
.collect()
.await;
Ok(Response::new(resp))
}
#[derive(Deserialize)]
struct ExtractMembership {
pub membership: MembershipState,
}
+1
View File
@@ -135,6 +135,7 @@ pub(crate) async fn add_3pid_route(
let email = services
.threepid
.get_valid_session(&body.sid, &body.client_secret)
.await
.map_err(|message| err!(Request(ThreepidAuthFailed("{message}"))))?
.consume();
+4 -7
View File
@@ -117,13 +117,10 @@ async fn set_account_data(
data: &RawJsonValue,
) -> Result {
if event_type_s == "m.fully_read" {
return Err!(Request(
BadJson(
"This endpoint cannot be used for marking a room as fully read (setting \
m.fully_read)"
),
METHOD_NOT_ALLOWED
));
return Err!(Request(BadJson(
"This endpoint cannot be used for marking a room as fully read (setting \
m.fully_read)"
)));
}
let data: serde_json::Value = serde_json::from_str(data.get())
+4 -2
View File
@@ -20,7 +20,8 @@ pub(crate) async fn create_alias_route(
services
.rooms
.alias
.appservice_checks(&body.room_alias, body.identity.appservice_info())?;
.appservice_checks(&body.room_alias, body.identity.appservice_info())
.await?;
// this isn't apart of alias_checks or delete alias route because we should
// allow removing forbidden room aliases
@@ -68,7 +69,8 @@ pub(crate) async fn delete_alias_route(
services
.rooms
.alias
.appservice_checks(&body.room_alias, body.identity.appservice_info())?;
.appservice_checks(&body.room_alias, body.identity.appservice_info())
.await?;
services
.rooms
Loaded 100 of 241 files, more files were not shown because too many files have changed in this diff. Show more