Compare commits

...

18 Commits

Author SHA1 Message Date
Jade Ellis e20cd2088a fix: Avoid serialising a raw string
Database safety: This is equivalent, as top level strings are directly
serialised as byte arrays when not wrapped in a serialisation newtype
2025-12-03 16:26:48 +00:00
Renovate Bot 33c3d23d60 chore(deps): update rust-patch-updates 2025-11-29 05:01:44 +00:00
Renovate Bot ce318fe455 chore(deps): update pre-commit hook crate-ci/typos to v1.40.0 2025-11-28 20:19:35 +00:00
Renovate Bot a729e1d63d chore(deps): update actions/upload-artifact action to v5 2025-11-28 20:19:10 +00:00
Ginger 956c3dfa62 chore: Fix deprecation warning 2025-11-28 15:08:20 -05:00
Renovate Bot 49e8f06559 chore(deps): update rust-patch-updates 2025-11-28 15:00:38 -05:00
rooot c0f4424cb9 fix(docs): blurry small logo, scroll resizing top bar
Signed-off-by: rooot <hey@rooot.gay>
2025-11-27 13:53:12 +01:00
Tobias Fella 3eac985c5e fix(docs): Correct typo and outdated name 2025-11-26 21:13:43 +01:00
Jade 5fd341096d fix(docs): Dead link 2025-11-26 00:10:59 +00:00
Renovate Bot a1b2d6ec46 chore(deps): update dependency @rspress/plugin-client-redirects to v2.0.0-rc.1 2025-11-25 21:50:27 +00:00
Renovate Bot 551563ce83 chore(deps): update dependency @rspress/plugin-preview to v2.0.0-rc.1 2025-11-25 18:38:26 +00:00
Ginger 9f133cf75b chore(deps): Update actions/checkout to v6 2025-11-25 18:26:28 +00:00
Ginger 23c398dc1e fix(ci): Remove explicit references to code.forgejo.org in action steps 2025-11-25 18:26:28 +00:00
Renovate Bot fa73893179 chore(deps): update pre-commit hook crate-ci/committed to v1.1.8 2025-11-25 17:16:13 +00:00
Renovate Bot 57fec44ec7 chore(deps): update dependency cargo-bins/cargo-binstall to v1.16.2 2025-11-24 05:02:19 +00:00
timedout bc8d304dbf style: Fix unnecessary qualification
Sounds like my university experience
2025-11-23 16:33:32 +00:00
timedout 7f4248a8c6 feat: Enhance remote room leave handling 2025-11-23 16:33:32 +00:00
aviac 430200b60e fix: add explicit fix of rpath
Without this the rpath is empty and the binary won't be able to load the librocksdb.so.10 shared lib
2025-11-23 16:26:27 +00:00
23 changed files with 258 additions and 1012 deletions
+3 -3
View File
@@ -32,12 +32,12 @@ jobs:
echo "Debian distribution: $DISTRIBUTION ($VERSION)" echo "Debian distribution: $DISTRIBUTION ($VERSION)"
- name: Checkout repository with full history - name: Checkout repository with full history
uses: https://code.forgejo.org/actions/checkout@v5 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Cache Cargo registry - name: Cache Cargo registry
uses: https://code.forgejo.org/actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/.cargo/registry ~/.cargo/registry
@@ -126,7 +126,7 @@ jobs:
[ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed" [ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed"
- name: Upload deb artifact - name: Upload deb artifact
uses: https://code.forgejo.org/actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity-${{ steps.debian-version.outputs.distribution }} name: continuwuity-${{ steps.debian-version.outputs.distribution }}
path: ${{ steps.cargo-deb.outputs.path }} path: ${{ steps.cargo-deb.outputs.path }}
+6 -6
View File
@@ -30,13 +30,13 @@ jobs:
echo "Fedora version: $VERSION" echo "Fedora version: $VERSION"
- name: Checkout repository with full history - name: Checkout repository with full history
uses: https://code.forgejo.org/actions/checkout@v5 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Cache DNF packages - name: Cache DNF packages
uses: https://code.forgejo.org/actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
/var/cache/dnf /var/cache/dnf
@@ -46,7 +46,7 @@ jobs:
dnf-fedora${{ steps.fedora.outputs.version }}- dnf-fedora${{ steps.fedora.outputs.version }}-
- name: Cache Cargo registry - name: Cache Cargo registry
uses: https://code.forgejo.org/actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/.cargo/registry ~/.cargo/registry
@@ -56,7 +56,7 @@ jobs:
cargo-fedora${{ steps.fedora.outputs.version }}- cargo-fedora${{ steps.fedora.outputs.version }}-
- name: Cache Rust build dependencies - name: Cache Rust build dependencies
uses: https://code.forgejo.org/actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/rpmbuild/BUILD/*/target/release/deps ~/rpmbuild/BUILD/*/target/release/deps
@@ -238,13 +238,13 @@ jobs:
cp $BIN_RPM upload-bin/ cp $BIN_RPM upload-bin/
- name: Upload binary RPM - name: Upload binary RPM
uses: https://code.forgejo.org/actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity name: continuwuity
path: upload-bin/ path: upload-bin/
- name: Upload debug RPM artifact - name: Upload debug RPM artifact
uses: https://code.forgejo.org/actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity-debug name: continuwuity-debug
path: artifacts/*debuginfo*.rpm path: artifacts/*debuginfo*.rpm
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps: steps:
- name: Sync repository - name: Sync repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
DOCKER_MIRROR_TOKEN: ${{ secrets.DOCKER_MIRROR_TOKEN }} DOCKER_MIRROR_TOKEN: ${{ secrets.DOCKER_MIRROR_TOKEN }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
+2 -2
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
@@ -47,7 +47,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
+4 -4
View File
@@ -43,7 +43,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
- name: Prepare Docker build environment - name: Prepare Docker build environment
@@ -97,7 +97,7 @@ jobs:
needs: build-release needs: build-release
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
- name: Create multi-platform manifest - name: Create multi-platform manifest
@@ -130,7 +130,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
- name: Prepare max-perf Docker build environment - name: Prepare max-perf Docker build environment
@@ -184,7 +184,7 @@ jobs:
needs: build-maxperf needs: build-maxperf
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
- name: Create max-perf manifest - name: Create max-perf manifest
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
options: --tmpfs /tmp:exec options: --tmpfs /tmp:exec
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
show-progress: false show-progress: false
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
update-flake-hashes: update-flake-hashes:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
fetch-tags: false fetch-tags: false
+2 -2
View File
@@ -23,7 +23,7 @@ repos:
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/crate-ci/typos - repo: https://github.com/crate-ci/typos
rev: v1.39.2 rev: v1.40.0
hooks: hooks:
- id: typos - id: typos
- id: typos - id: typos
@@ -31,7 +31,7 @@ repos:
stages: [commit-msg] stages: [commit-msg]
- repo: https://github.com/crate-ci/committed - repo: https://github.com/crate-ci/committed
rev: v1.1.7 rev: v1.1.8
hooks: hooks:
- id: committed - id: committed
Generated
+34 -48
View File
@@ -831,9 +831,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.52" version = "4.5.53"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa8120877db0e5c011242f96806ce3c94e0737ab8108532a76a3300a01db2ab8" checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@@ -850,9 +850,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.52" version = "4.5.53"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02576b399397b659c26064fbc92a75fede9d18ffd5f80ca1cd74ddab167016e1" checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@@ -1750,7 +1750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.61.2", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@@ -2405,7 +2405,7 @@ dependencies = [
"libc", "libc",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"socket2 0.6.1", "socket2 0.5.10",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -2990,23 +2990,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]] [[package]]
name = "minicbor" name = "minicbor"
version = "2.1.1" version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f182275033b808ede9427884caa8e05fa7db930801759524ca7925bd8aa7a82" checksum = "f9a1119e42fbacc2bb65d860de6eb7c930562bc71d42dca026d06b0228231f77"
dependencies = [
"minicbor-derive",
]
[[package]]
name = "minicbor-derive"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b17290c95158a760027059fe3f511970d6857e47ff5008f9e09bffe3d3e1c6af"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "minicbor-serde" name = "minicbor-serde"
@@ -3020,9 +3006,9 @@ dependencies = [
[[package]] [[package]]
name = "minimad" name = "minimad"
version = "0.13.1" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9c5d708226d186590a7b6d4a9780e2bdda5f689e0d58cd17012a298efd745d2" checksum = "df8b688969b16915f3ecadc7829d5b7779dee4977e503f767f34136803d5c06f"
dependencies = [ dependencies = [
"once_cell", "once_cell",
] ]
@@ -3135,7 +3121,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [ dependencies = [
"windows-sys 0.61.2", "windows-sys 0.60.2",
] ]
[[package]] [[package]]
@@ -3761,7 +3747,7 @@ dependencies = [
"quinn-udp", "quinn-udp",
"rustc-hash", "rustc-hash",
"rustls", "rustls",
"socket2 0.6.1", "socket2 0.5.10",
"thiserror 2.0.17", "thiserror 2.0.17",
"tokio", "tokio",
"tracing", "tracing",
@@ -3798,7 +3784,7 @@ dependencies = [
"cfg_aliases", "cfg_aliases",
"libc", "libc",
"once_cell", "once_cell",
"socket2 0.6.1", "socket2 0.5.10",
"tracing", "tracing",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@@ -4044,9 +4030,9 @@ dependencies = [
[[package]] [[package]]
name = "resolv-conf" name = "resolv-conf"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7"
[[package]] [[package]]
name = "rgb" name = "rgb"
@@ -4337,7 +4323,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.61.2", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@@ -4643,9 +4629,9 @@ dependencies = [
[[package]] [[package]]
name = "serde-saphyr" name = "serde-saphyr"
version = "0.0.8" version = "0.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0916ccf524f1ccec1b3c02193c9e3d2e167aee9b6b294829dce6f4411332155" checksum = "9b9e06cddad47cc6214c0c456cf209b99a58b54223e7af2f6d4b88a5a9968499"
dependencies = [ dependencies = [
"ahash", "ahash",
"base64 0.22.1", "base64 0.22.1",
@@ -4974,9 +4960,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.110" version = "2.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5022,9 +5008,9 @@ dependencies = [
[[package]] [[package]]
name = "termimad" name = "termimad"
version = "0.34.0" version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68ff5ca043d65d4ea43b65cdb4e3aba119657d0d12caf44f93212ec3168a8e20" checksum = "889a9370996b74cf46016ce35b96c248a9ac36d69aab1d112b3e09bc33affa49"
dependencies = [ dependencies = [
"coolor", "coolor",
"crokey", "crokey",
@@ -5420,9 +5406,9 @@ dependencies = [
[[package]] [[package]]
name = "tower-http" name = "tower-http"
version = "0.6.6" version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456"
dependencies = [ dependencies = [
"async-compression", "async-compression",
"bitflags", "bitflags",
@@ -5456,9 +5442,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.41" version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
dependencies = [ dependencies = [
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
@@ -5467,9 +5453,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.30" version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5478,9 +5464,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.34" version = "0.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable", "valuable",
@@ -5499,9 +5485,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-journald" name = "tracing-journald"
version = "0.3.1" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc0b4143302cf1022dac868d521e36e8b27691f72c84b3311750d5188ebba657" checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0"
dependencies = [ dependencies = [
"libc", "libc",
"tracing-core", "tracing-core",
@@ -5540,9 +5526,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-subscriber" name = "tracing-subscriber"
version = "0.3.20" version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
dependencies = [ dependencies = [
"matchers", "matchers",
"nu-ansi-term", "nu-ansi-term",
+1 -1
View File
@@ -167,7 +167,7 @@ features = ["raw_value"]
# Used for appservice registration files # Used for appservice registration files
[workspace.dependencies.serde-saphyr] [workspace.dependencies.serde-saphyr]
version = "0.0.8" version = "0.0.10"
# Used to load forbidden room/user regex from config # Used to load forbidden room/user regex from config
[workspace.dependencies.serde_regex] [workspace.dependencies.serde_regex]
+1 -1
View File
@@ -48,7 +48,7 @@ EOF
# Developer tool versions # Developer tool versions
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall # renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
ENV BINSTALL_VERSION=1.16.0 ENV BINSTALL_VERSION=1.16.2
# renovate: datasource=github-releases depName=psastras/sbom-rs # renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1 ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree # 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 # Developer tool versions
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall # renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
ENV BINSTALL_VERSION=1.16.0 ENV BINSTALL_VERSION=1.16.2
# renovate: datasource=github-releases depName=psastras/sbom-rs # renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1 ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree # renovate: datasource=crate depName=lddtree
+1 -1
View File
@@ -10,7 +10,7 @@ community channels that reference them. We've written these guidelines to help u
environment where everyone feels safe and respected. environment where everyone feels safe and respected.
For code and contribution guidelines, please refer to the For code and contribution guidelines, please refer to the
[Contributor's Covenant](https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CODE_OF_CONDUCT.mdx). [Contributor's Covenant](https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CODE_OF_CONDUCT.md).
Below are additional guidelines specific to the Continuwuity community. Below are additional guidelines specific to the Continuwuity community.
## Our Values and Expected Behaviors ## Our Values and Expected Behaviors
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
### If you already built the conduduwit image with 'docker build' or want to use the Docker Hub image, ### If you already built the continuwuity image with 'docker build' or want to use the Docker Hub image,
### then you are ready to go. ### then you are ready to go.
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
+3
View File
@@ -97,6 +97,9 @@ rec {
craneLib.buildPackage ( craneLib.buildPackage (
(commonAttrs commonAttrsArgs) (commonAttrs commonAttrsArgs)
// { // {
postFixup = ''
patchelf --set-rpath "$(${pkgs.patchelf}/bin/patchelf --print-rpath $out/bin/${crateInfo.pname}):${rocksdb}/lib" $out/bin/${crateInfo.pname}
'';
cargoArtifacts = deps; cargoArtifacts = deps;
doCheck = true; doCheck = true;
env = uwuenv.buildPackageEnv // rocksdbEnv; env = uwuenv.buildPackageEnv // rocksdbEnv;
+124 -915
View File
File diff suppressed because it is too large Load Diff
+24 -6
View File
@@ -1,4 +1,7 @@
use std::{collections::BTreeMap, fmt::Write as _}; use std::{
collections::{BTreeMap, HashSet},
fmt::Write as _,
};
use api::client::{ use api::client::{
full_user_deactivate, join_room_by_id_helper, leave_all_rooms, leave_room, remote_leave_room, full_user_deactivate, join_room_by_id_helper, leave_all_rooms, leave_room, remote_leave_room,
@@ -12,7 +15,7 @@ use conduwuit::{
}; };
use futures::{FutureExt, StreamExt}; use futures::{FutureExt, StreamExt};
use ruma::{ use ruma::{
OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedUserId, UserId, OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName, OwnedUserId, UserId,
events::{ events::{
RoomAccountDataEventType, StateEventType, RoomAccountDataEventType, StateEventType,
room::{ room::{
@@ -950,23 +953,38 @@ pub(super) async fn force_leave_remote_room(
&self, &self,
user_id: String, user_id: String,
room_id: OwnedRoomOrAliasId, room_id: OwnedRoomOrAliasId,
via: Option<String>,
) -> Result { ) -> Result {
let user_id = parse_local_user_id(self.services, &user_id)?; let user_id = parse_local_user_id(self.services, &user_id)?;
let (room_id, _) = self let (room_id, vias_raw) = self
.services .services
.rooms .rooms
.alias .alias
.resolve_with_servers(&room_id, None) .resolve_with_servers(
&room_id,
if let Some(v) = via.clone() {
Some(vec![OwnedServerName::parse(v)?])
} else {
None
},
)
.await?; .await?;
assert!( assert!(
self.services.globals.user_is_local(&user_id), self.services.globals.user_is_local(&user_id),
"Parsed user_id must be a local user" "Parsed user_id must be a local user"
); );
remote_leave_room(self.services, &user_id, &room_id, None) let mut vias: HashSet<OwnedServerName> = HashSet::new();
if let Some(via) = via {
vias.insert(OwnedServerName::parse(via)?);
}
for server in vias_raw {
vias.insert(server);
}
remote_leave_room(self.services, &user_id, &room_id, None, vias)
.boxed() .boxed()
.await?; .await?;
self.write_str(&format!("{user_id} has been joined to {room_id}.",)) self.write_str(&format!("{user_id} successfully left {room_id} via remote server."))
.await .await
} }
+1
View File
@@ -107,6 +107,7 @@ pub enum UserCommand {
ForceLeaveRemoteRoom { ForceLeaveRemoteRoom {
user_id: String, user_id: String,
room_id: OwnedRoomOrAliasId, room_id: OwnedRoomOrAliasId,
via: Option<String>,
}, },
/// - Forces the specified user to drop their power levels to the room /// - Forces the specified user to drop their power levels to the room
+35 -15
View File
@@ -131,9 +131,10 @@ pub async fn leave_room(
// Ask a remote server if we don't have this room and are not knocking on it // Ask a remote server if we don't have this room and are not knocking on it
if dont_have_room.and(not_knocked).await { if dont_have_room.and(not_knocked).await {
if let Err(e) = remote_leave_room(services, user_id, room_id, reason.clone()) if let Err(e) =
.boxed() remote_leave_room(services, user_id, room_id, reason.clone(), HashSet::new())
.await .boxed()
.await
{ {
warn!(%user_id, "Failed to leave room {room_id} remotely: {e}"); warn!(%user_id, "Failed to leave room {room_id} remotely: {e}");
// Don't tell the client about this error // Don't tell the client about this error
@@ -215,22 +216,25 @@ pub async fn leave_room(
Ok(()) Ok(())
} }
pub async fn remote_leave_room( pub async fn remote_leave_room<S: ::std::hash::BuildHasher>(
services: &Services, services: &Services,
user_id: &UserId, user_id: &UserId,
room_id: &RoomId, room_id: &RoomId,
reason: Option<String>, reason: Option<String>,
mut servers: HashSet<OwnedServerName, S>,
) -> Result<()> { ) -> Result<()> {
let mut make_leave_response_and_server = let mut make_leave_response_and_server =
Err!(BadServerResponse("No remote server available to assist in leaving {room_id}.")); Err!(BadServerResponse("No remote server available to assist in leaving {room_id}."));
let mut servers: HashSet<OwnedServerName> = services servers.extend(
.rooms services
.state_cache .rooms
.servers_invite_via(room_id) .state_cache
.map(ToOwned::to_owned) .servers_invite_via(room_id)
.collect() .map(ToOwned::to_owned)
.await; .collect::<HashSet<OwnedServerName>>()
.await,
);
match services match services
.rooms .rooms
@@ -277,6 +281,11 @@ pub async fn remote_leave_room(
if let Some(room_id_server_name) = room_id.server_name() { if let Some(room_id_server_name) = room_id.server_name() {
servers.insert(room_id_server_name.to_owned()); servers.insert(room_id_server_name.to_owned());
} }
if servers.is_empty() {
return Err!(BadServerResponse(warn!(
"No remote servers found to assist in leaving {room_id}."
)));
}
debug_info!("servers in remote_leave_room: {servers:?}"); debug_info!("servers in remote_leave_room: {servers:?}");
@@ -284,7 +293,7 @@ pub async fn remote_leave_room(
let make_leave_response = services let make_leave_response = services
.sending .sending
.send_federation_request( .send_federation_request(
&remote_server, remote_server.as_ref(),
federation::membership::prepare_leave_event::v1::Request { federation::membership::prepare_leave_event::v1::Request {
room_id: room_id.to_owned(), room_id: room_id.to_owned(),
user_id: user_id.to_owned(), user_id: user_id.to_owned(),
@@ -292,11 +301,21 @@ pub async fn remote_leave_room(
) )
.await; .await;
make_leave_response_and_server = make_leave_response.map(|r| (r, remote_server)); let error = make_leave_response.as_ref().err().map(ToString::to_string);
make_leave_response_and_server = make_leave_response.map(|r| (r, remote_server.clone()));
if make_leave_response_and_server.is_ok() { if make_leave_response_and_server.is_ok() {
debug_info!(
"Received make_leave_response from {} for leaving {room_id}",
remote_server
);
break; break;
} }
debug_warn!(
"Failed to get make_leave_response from {} for leaving {room_id}: {}",
remote_server,
error.unwrap()
);
} }
let (make_leave_response, remote_server) = make_leave_response_and_server?; let (make_leave_response, remote_server) = make_leave_response_and_server?;
@@ -304,13 +323,14 @@ pub async fn remote_leave_room(
let Some(room_version_id) = make_leave_response.room_version else { let Some(room_version_id) = make_leave_response.room_version else {
return Err!(BadServerResponse(warn!( return Err!(BadServerResponse(warn!(
"No room version was returned by {remote_server} for {room_id}, room version is \ "No room version was returned by {remote_server} for {room_id}, room version is \
likely not supported by conduwuit" likely not supported by continuwuity"
))); )));
}; };
if !services.server.supported_room_version(&room_version_id) { if !services.server.supported_room_version(&room_version_id) {
return Err!(BadServerResponse(warn!( return Err!(BadServerResponse(warn!(
"Remote room version {room_version_id} for {room_id} is not supported by conduwuit", "Remote room version {room_version_id} for {room_id} is not supported by \
continuwuity",
))); )));
} }
+1 -1
View File
@@ -66,7 +66,7 @@ pub(crate) fn build(services: &Arc<Services>) -> Result<(Router, Guard)> {
.layer(RequestBodyTimeoutLayer::new(Duration::from_secs( .layer(RequestBodyTimeoutLayer::new(Duration::from_secs(
server.config.client_receive_timeout, server.config.client_receive_timeout,
))) )))
.layer(TimeoutLayer::new(Duration::from_secs(server.config.client_request_timeout))) .layer(TimeoutLayer::with_status_code(StatusCode::REQUEST_TIMEOUT, Duration::from_secs(server.config.client_request_timeout)))
.layer(SetResponseHeaderLayer::if_not_present( .layer(SetResponseHeaderLayer::if_not_present(
HeaderName::from_static("origin-agent-cluster"), // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster HeaderName::from_static("origin-agent-cluster"), // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster
HeaderValue::from_static("?1"), HeaderValue::from_static("?1"),
+1 -1
View File
@@ -366,7 +366,7 @@ pub async fn mark_as_invited(
.raw_aput::<8, _, _>(&roomuser_id, self.services.globals.next_count().unwrap()); .raw_aput::<8, _, _>(&roomuser_id, self.services.globals.next_count().unwrap());
self.db self.db
.userroomid_invitesender .userroomid_invitesender
.raw_put(&userroom_id, sender_user); .insert(&userroom_id, sender_user);
self.db.userroomid_joined.remove(&userroom_id); self.db.userroomid_joined.remove(&userroom_id);
self.db.roomuserid_joined.remove(&roomuser_id); self.db.roomuserid_joined.remove(&roomuser_id);
+9
View File
@@ -96,3 +96,12 @@ img {
max-height: 35vh; max-height: 35vh;
max-width: none; /* Having this set causes slight aspect ratio breakage */ max-width: none; /* Having this set causes slight aspect ratio breakage */
} }
/* fix navigation bar resizing when scrolling */
body:not(.notTopArrived) header.rp-nav {
border-bottom: 1px solid transparent !important;
}
/* fix the small logo on the top left looking blurry */
.rspress-logo {
height: 32px;
}