Compare commits
63
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89291f8707 | ||
|
|
9eca253229 | ||
|
|
a06ebfe6f6 | ||
|
|
6e41477a0b | ||
|
|
8a0e16cabd | ||
|
|
d9f023762e | ||
|
|
d32c74052c | ||
|
|
0716e2acd8 | ||
|
|
8eb3201b38 | ||
|
|
811ae9d2cc | ||
|
|
b2cab883d6 | ||
|
|
46d0e98424 | ||
|
|
db2f523028 | ||
|
|
b06f422837 | ||
|
|
f2d8a12aa7 | ||
|
|
7cf68b6850 | ||
|
|
894dd5277e | ||
|
|
0386474118 | ||
|
|
b8a088d2a6 | ||
|
|
8f35ab23a3 | ||
|
|
1e4922d6a3 | ||
|
|
0587f18063 | ||
|
|
7c10c9591e | ||
|
|
3ad2fef28e | ||
|
|
e16ce42785 | ||
|
|
246774e3eb | ||
|
|
3e6f210f46 | ||
|
|
3213f8c41b | ||
|
|
6cdac33ca4 | ||
|
|
6b39bd931e | ||
|
|
e1b2c8575c | ||
|
|
54bdada04d | ||
|
|
8a2867e64b | ||
|
|
2e6e8e72b8 | ||
|
|
d36c782e56 | ||
|
|
ad7d735739 | ||
|
|
4bb2dd4449 | ||
|
|
8aea38fc67 | ||
|
|
963bc87c54 | ||
|
|
85c58d5ed0 | ||
|
|
8e5cdf50b5 | ||
|
|
d3f389cab1 | ||
|
|
f7ce35c636 | ||
|
|
a52d6a89bc | ||
|
|
adeb872abb | ||
|
|
b6380b6c8a | ||
|
|
96d1778bb4 | ||
|
|
0aa34123a8 | ||
|
|
070a94d0d7 | ||
|
|
9b0cbc9db1 | ||
|
|
fa0351084b | ||
|
|
61ed3c64e3 | ||
|
|
be0ff3b854 | ||
|
|
93078858c1 | ||
|
|
076340227f | ||
|
|
bf770fed83 | ||
|
|
b1335a830f | ||
|
|
cf42d0aab0 | ||
|
|
6c50f51feb | ||
|
|
cabc393b6b | ||
|
|
72a3e3ba17 | ||
|
|
162d8b5a80 | ||
|
|
d17c40e79f |
No files matched your search
@@ -31,6 +31,20 @@ jobs:
|
||||
- name: Run ESLint
|
||||
run: npx eslint --ext .js hookshot/
|
||||
|
||||
readme-no-webhook-ids:
|
||||
name: No Hookshot webhook IDs in README
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# A Hookshot webhook URL's UUID is its only secret, and this repo is public.
|
||||
- name: Reject full UUIDs
|
||||
run: |
|
||||
if grep -nE '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}' README.md; then
|
||||
echo "::error::README.md contains a full UUID. Webhook IDs are secrets: list only the first 8 characters."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hooks-no-secrets:
|
||||
name: No secrets in webhook configs
|
||||
runs-on: ubuntu-latest
|
||||
@@ -82,19 +96,20 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Python 3.10 and pip-audit
|
||||
- name: Install Python 3.13 and pip-audit
|
||||
run: |
|
||||
# Debian Bullseye only ships Python 3.9; use a prebuilt standalone binary
|
||||
curl -sSL "https://github.com/indygreg/python-build-standalone/releases/download/20241002/cpython-3.10.15+20241002-x86_64-unknown-linux-gnu-install_only.tar.gz" \
|
||||
# Debian Bullseye only ships Python 3.9; use a prebuilt standalone binary.
|
||||
# 3.13 matches the bot's runtime on LXC 151 (Debian trixie).
|
||||
curl -sSL "https://github.com/astral-sh/python-build-standalone/releases/download/20250317/cpython-3.13.2+20250317-x86_64-unknown-linux-gnu-install_only.tar.gz" \
|
||||
| tar -xz -C /opt
|
||||
# Install bot deps + pip-audit into the same env; --local below avoids
|
||||
# pip-audit creating an internal venv (ensurepip fails on standalone builds)
|
||||
/opt/python/bin/pip install --upgrade pip setuptools
|
||||
/opt/python/bin/pip install pip-audit -r matrixbot/requirements.txt
|
||||
/opt/python/bin/pip install --upgrade pip-audit -r matrixbot/requirements.txt
|
||||
|
||||
- name: Audit matrixbot dependencies
|
||||
# --local scans the env without spawning a venv (required for standalone Python)
|
||||
# CVE-2026-3219 is in pip itself, not our code — ignore it explicitly
|
||||
# CVE-2026-3219 is in pip itself, not our code — ignore it explicitly.
|
||||
run: /opt/python/bin/pip-audit --local --ignore-vuln CVE-2026-3219
|
||||
|
||||
secret-scan:
|
||||
@@ -116,7 +131,7 @@ jobs:
|
||||
run: |
|
||||
# Scan application code directories — deploy/ is excluded because
|
||||
# it contains intentional Gitea webhook HMAC secrets in hooks-lxc*.json
|
||||
for dir in matrixbot/ hookshot/ .gitea/ systemd/ cinny/ landing/; do
|
||||
for dir in matrixbot/ hookshot/ .gitea/ systemd/ cinny/ landing/ discord-bridge/; do
|
||||
[ -d "$dir" ] || continue
|
||||
gitleaks detect --source "$dir" --no-git --config .gitleaks.toml \
|
||||
--redact --exit-code 1
|
||||
|
||||
@@ -26,6 +26,9 @@ matrix/
|
||||
│ └── index.html # matrix.lotusguild.org landing page
|
||||
├── draupnir/
|
||||
│ └── production.yaml # Draupnir config (access token is redacted — see rotation docs below)
|
||||
├── discord-bridge/
|
||||
│ ├── config.yaml # mautrix-discord config (DB password filled in on the server, never committed)
|
||||
│ └── install.sh # One-time installer, run on the Proxmox node hosting LXC 109 + 151
|
||||
├── deploy/ # Auto-deployment infrastructure
|
||||
│ ├── lxc151-hookshot.sh # Deploy script for LXC 151 (matrix/hookshot/livekit)
|
||||
│ ├── lxc106-cinny.sh # Deploy script for LXC 106 (cinny)
|
||||
@@ -41,6 +44,7 @@ matrix/
|
||||
├── livekit-graceful-restart.service # oneshot — checks pending restart flag
|
||||
├── livekit-graceful-restart.timer # Runs every 5 min
|
||||
├── draupnir.service
|
||||
├── mautrix-discord.service # Discord bridge (LXC 151)
|
||||
└── cinny-upstream-check.cron # Installed to /etc/cron.d/ on LXC 106 — runs daily at noon
|
||||
```
|
||||
|
||||
@@ -50,7 +54,7 @@ matrix/
|
||||
|
||||
| Service | IP | LXC | RAM | Disk | Versions |
|
||||
|---------|----|-----|-----|------|----------|
|
||||
| Synapse | 10.10.10.29 | 151 | 12GB | 50GB | Synapse 1.159.0, LiveKit 1.9.11, hookshot 7.3.2, coturn latest |
|
||||
| Synapse | 10.10.10.29 | 151 | 12GB | 50GB | Synapse 1.164.1, LiveKit 1.9.11, hookshot 7.3.2, coturn latest |
|
||||
| PostgreSQL 17 | 10.10.10.44 | 109 | 6GB | 80GB | PostgreSQL 17.9 |
|
||||
| Cinny Web | 10.10.10.6 | 106 | 2GB | 8GB | Debian 12, nginx, Node 24, Lotus Cinny fork (custom, tracks `cinnyapp/cinny` main) |
|
||||
| Draupnir | 10.10.10.24 | 110 | 1GB | 10GB | Draupnir v2.9.0, Node.js v22 |
|
||||
@@ -67,7 +71,7 @@ matrix/
|
||||
- coturn config: `/etc/turnserver.conf`
|
||||
- LiveKit config: `/etc/livekit/config.yaml`
|
||||
- LiveKit service: `livekit-server.service`
|
||||
- lk-jwt-service: `lk-jwt-service.service` (now binds `:8071` via drop-in `/etc/systemd/system/lk-jwt-service.service.d/override.conf`; serves JWT tokens for MatrixRTC at `/sfu/get` and legacy `/get_token`)
|
||||
- lk-jwt-service: `lk-jwt-service.service` (now binds `127.0.0.1:8071` via drop-in `/etc/systemd/system/lk-jwt-service.service.d/override.conf`; serves JWT tokens for MatrixRTC at `/sfu/get` and legacy `/get_token`)
|
||||
- voice-limit-guard: `voice-limit-guard.service` (binds `:8070`, fronts lk-jwt-service — enforces hard per-room voice participant limits **and publish permissions (screenshare/camera via JWT re-signing)** for ALL clients; script `/opt/voice-limit-guard/voice-limit-guard.py`) — see [Voice Channel Limits & Call Permissions](#voice-channel-limits--call-permissions)
|
||||
- Hookshot: `/opt/hookshot/`, service: `matrix-hookshot.service`
|
||||
- Hookshot config: `/opt/hookshot/config.yml`
|
||||
@@ -84,6 +88,7 @@ matrix/
|
||||
- Service: `draupnir.service`
|
||||
- Management room: `#management:matrix.lotusguild.org` (`!mEvR5fe3jMmzwd-FwNygD72OY_yu8H3UP_N-57oK7MI`)
|
||||
- Bot account: `@draupnir:matrix.lotusguild.org` (power level 100 in all protected rooms and the Lotus Guild space)
|
||||
- Encryption: off (`experimentalRustCrypto: false`), so Draupnir cannot read commands sent in the encrypted management room; send them unencrypted for now. Turning it on needs a device-bound access token first: with the current token, 2.9.0 exits with "Encryption not possible: server not revealing device ID" (tried and reverted 2026-10-16, #26 / #28).
|
||||
- Subscribed ban lists: `#community-moderation-effort-bl:neko.dev`, `#matrix-org-coc-bl:matrix.org`
|
||||
- Rebuild: `NODE_OPTIONS="--max_old_space_size=6144" npm run build`
|
||||
- Healthz endpoint: `http://10.10.10.24:8081/healthz` (200 = healthy, 418 = disconnected)
|
||||
@@ -186,9 +191,14 @@ Killing livekit-server while a call is active drops everyone. Instead:
|
||||
|
||||
1. Deploy to LXC 151 copies the new `livekit-server.service` and sets a `/run/livekit-restart-pending` flag
|
||||
2. `livekit-graceful-restart.timer` runs every 5 minutes
|
||||
3. The timer script counts established TCP connections on port 7881 (`ss -tn state established`)
|
||||
4. If zero connections → restarts livekit-server and clears the flag
|
||||
5. If connections exist → logs and exits, retries in 5 minutes
|
||||
3. The timer script reads LiveKit's own `livekit_participant_total` (`:6789/metrics`) and counts open
|
||||
signalling WebSockets on :7880. If the metrics can't be read it assumes a call is active.
|
||||
4. Zero participants and zero signalling connections → restarts livekit-server and clears the flag
|
||||
5. Otherwise → logs and exits, retries in 5 minutes
|
||||
|
||||
Until 2026-11-03 it counted `ESTAB` lines on :7881, which was always 0 (an `ss` state filter drops the
|
||||
State column, and :7881 is only the ICE-TCP fallback), so it would have restarted mid-call (matrix #54).
|
||||
To stage a restart by hand, for example after replacing the binary: `touch /run/livekit-restart-pending`.
|
||||
|
||||
---
|
||||
|
||||
@@ -205,6 +215,7 @@ Every Matrix client must fetch a LiveKit JWT from lk-jwt-service before it can j
|
||||
- **Participant limit** — it forwards to lk-jwt-service, and if a token is issued decodes the JWT to get the LiveKit alias (`video.room`) + requester (`sub`), then asks LiveKit `ListParticipants` how many **distinct Matrix users** are in the room. requester already present (rejoin) → allow · distinct users ≥ limit → **403** · otherwise → allow.
|
||||
- **Publish permissions (screenshare / camera)** — LiveKit is a pure SFU and **cannot cap a publisher's bitrate/framerate** (no such field exists in the grant/config/API — that stays a Lotus-client-cooperative setting). But the JWT's `video.canPublishSources` **is** SFU-enforced for every client. Since the guard holds the LiveKit signing secret, when a room forbids a source it **decodes the issued token, drops `screen_share`/`screen_share_audio` (and/or `camera`) from `canPublishSources`, and re-signs it** (HS256, same key). Microphone is always kept. The SFU then rejects those tracks for **all** clients — nothing to opt into.
|
||||
- **Live (mid-call) enforcement** — the JWT re-sign covers anyone *joining* after a policy change. For people **already in the call**, a background **reconcile loop** (every `GUARD_RECONCILE_INTERVAL`, default 3 s) calls LiveKit `UpdateParticipant` to narrow their `canPublishSources`, which **unpublishes an in-progress screenshare/camera server-side for all clients** and blocks re-publish (confirmed LiveKit 1.9.11 behavior: reducing `can_publish_sources` removes the offending live track). So flipping a room to audio-only kills existing cameras/screenshares within ~one interval. The loop learns each LiveKit room's Matrix id from tokens it issues, only ever **removes** forbidden sources (never grants), preserves every other permission flag (full-replace safety), and no-ops once compliant. Disable with `GUARD_RECONCILE=0`.
|
||||
- **Connect-time limit (matrix #25)** — the token check can't stop a token fetched while there was space (lk-jwt tokens last an hour) from being used once the room is full. The same reconcile loop compares each limited room's **distinct Matrix users** with `max_users`, and when people who **arrived since the previous sweep** take it over the limit it calls LiveKit `RemoveParticipant` on them, newest first (all their devices). People already in the call are never removed, so **lowering a limit mid-call kicks nobody**; a person's extra devices never count twice. The first sweep of a room only records who is there. Simultaneous joins are already handled at token issue (per-room lock + 30 s slot reservations).
|
||||
- **Fail-open:** any error (admin API down, bad/absent token, LiveKit unreachable, unparseable room id, unexpected JWT shape) returns the upstream response **unchanged**, so calls keep working even if enforcement is degraded. The limit check and the source-policy re-sign are **independent** (a LiveKit-admin outage during the limit count can't skip the source restriction, and vice-versa). Before re-signing, the guard **verifies its own secret actually signed the token** — on a `LIVEKIT_SECRET` mismatch it skips the restriction and passes the original token through (so a secret drift can never emit a token the SFU rejects). A room with no policy set takes a zero-overhead fast path (token untouched).
|
||||
|
||||
> `LIVEKIT_KEY`/`LIVEKIT_SECRET` live in `/etc/matrix-deploy.env` (0600, not in git). The same pair must
|
||||
@@ -237,7 +248,9 @@ install -D -m644 /opt/matrix-config/livekit/voice-limit-guard.py /opt/voice-limi
|
||||
install -m644 /opt/matrix-config/systemd/voice-limit-guard.service /etc/systemd/system/voice-limit-guard.service
|
||||
# one-time: rebind lk-jwt-service to :8071
|
||||
mkdir -p /etc/systemd/system/lk-jwt-service.service.d
|
||||
printf '[Service]\nEnvironment=LIVEKIT_JWT_BIND=:8071\n' > /etc/systemd/system/lk-jwt-service.service.d/override.conf
|
||||
# Loopback only (matrix #24): the guard runs on this LXC; binding all
|
||||
# interfaces let any LAN host mint unguarded tokens straight from :8071.
|
||||
printf '[Service]\nEnvironment=LIVEKIT_JWT_BIND=127.0.0.1:8071\n' > /etc/systemd/system/lk-jwt-service.service.d/override.conf
|
||||
systemctl daemon-reload && systemctl restart lk-jwt-service && systemctl enable --now voice-limit-guard
|
||||
```
|
||||
|
||||
@@ -282,6 +295,7 @@ The token in `draupnir/production.yaml` in this repo is **intentionally redacted
|
||||
| 9002 | Hookshot bridge (appservice) | 127.0.0.1 |
|
||||
| 9003 | Hookshot webhooks | 0.0.0.0 |
|
||||
| 9004 | Hookshot metrics | 0.0.0.0 |
|
||||
| 29334 | mautrix-discord (appservice + avatar proxy for NPM) | 0.0.0.0 |
|
||||
| 9100 | node_exporter | 0.0.0.0 |
|
||||
| 9101 | matrix-admin exporter | 0.0.0.0 |
|
||||
| 9500 | webhook (auto-deploy) | 0.0.0.0 |
|
||||
@@ -289,7 +303,7 @@ The token in `draupnir/production.yaml` in this repo is **intentionally redacted
|
||||
| 7880 | LiveKit HTTP | 0.0.0.0 |
|
||||
| 7881 | LiveKit RTC TCP | 0.0.0.0 |
|
||||
| 8070 | voice-limit-guard (fronts lk-jwt-service) | 0.0.0.0 |
|
||||
| 8071 | lk-jwt-service (behind guard) | 0.0.0.0 |
|
||||
| 8071 | lk-jwt-service (behind guard) | 127.0.0.1 (matrix #24; was 0.0.0.0) |
|
||||
| 8080 | synapse-admin (nginx) | 0.0.0.0 |
|
||||
| 3478 | coturn STUN/TURN | 0.0.0.0 |
|
||||
| 5349 | coturn TURNS/TLS | 0.0.0.0 |
|
||||
@@ -321,6 +335,7 @@ The token in `draupnir/production.yaml` in this repo is **intentionally redacted
|
||||
| Commands | `!ou56mVZQ8ZB7AhDYPmBV5_BR28WMZ4x5zwZkPCqjq1s` | restricted (Space members) |
|
||||
| Memes | `!GK6v5cLEEnowIooQJv5jECfISUjADjt8aKhWv9VbG5U` | restricted (Space members) |
|
||||
| Music | `!ktQu0gavhjpCMkgxk8SYdb6mnJRY-u7mY7_KfksV0SU` | restricted (Space members) |
|
||||
| Discord bridge (Discord channel `1565159372122882070`) | `!hm4ghdqvSYMokV30Ow-0TKK5hMZRSXfDiHOIzrK-c_A` | invite |
|
||||
| Voice Room | `!ARbRFSPNp2U0MslWTBGoTT3gbmJJ25dPRL6enQntvPo` | restricted (Space members) |
|
||||
| Management | `!mEvR5fe3jMmzwd-FwNygD72OY_yu8H3UP_N-57oK7MI` | invite |
|
||||
| Cool Kids | `!R7DT3QZHG9P8QQvX6zsZYxjkKgmUucxDz_n31qNrC94` | invite |
|
||||
@@ -333,27 +348,34 @@ The token in `draupnir/production.yaml` in this repo is **intentionally redacted
|
||||
|
||||
---
|
||||
|
||||
## Webhook Integrations (matrix-hookshot 7.3.2)
|
||||
## Webhook Integrations (matrix-hookshot 7.5.0)
|
||||
|
||||
Generic webhooks bridged into **Spam and Stuff**.
|
||||
Each service gets its own virtual user (`@hookshot_<service>`) with a unique avatar.
|
||||
Webhook URL format: `https://matrix.lotusguild.org/webhook/<uuid>`
|
||||
|
||||
> The UUID **is** the secret: anyone who has it can post into the room. This repo is public, so
|
||||
> the table lists only the first 8 characters (enough to match Hookshot's logs); the full URLs
|
||||
> live in each sender's settings. Full UUIDs were in this file from 2026-02-20 to 2026-11-03,
|
||||
> so the IDs below are exposed in git history until rotated (see *Webhook secrets — rotating*).
|
||||
> Grafana, Proxmox, Uptime Kuma and Ci-Alert were rotated on 2026-11-03 (the old IDs now return 404).
|
||||
> CI (`readme-no-webhook-ids`) rejects full UUIDs in this README.
|
||||
|
||||
| Service | Webhook UUID | Notes |
|
||||
|---------|-------------|-------|
|
||||
| Grafana | `df4a1302-2d62-4a01-b858-fb56f4d3781a` | Unified alerting contact point |
|
||||
| Proxmox | `9b3eafe5-7689-4011-addd-c466e524661d` | Notification system (8.1+), Discord embed format |
|
||||
| Sonarr | `aeffc311-0686-42cb-9eeb-6757140c072e` | All event types |
|
||||
| Radarr | `34913454-c1ac-4cda-82ea-924d4a9e60eb` | All event types |
|
||||
| Readarr | `e57ab4f3-56e6-4dc4-8b30-2f4fd4bbeb0b` | All event types |
|
||||
| Lidarr | `66ac6fdd-69f6-4f47-bb00-b7f6d84d7c1c` | All event types |
|
||||
| Uptime Kuma | `1a02e890-bb25-42f1-99fe-bba6a19f1811` | Status change notifications |
|
||||
| Seerr | `555185af-90a1-42ff-aed5-c344e11955cf` | Request/approval events |
|
||||
| Owncast (Livestream) | `9993e911-c68b-4271-a178-c2d65ca88499` | STREAM_STARTED / STREAM_STOPPED |
|
||||
| Bazarr | `470fb267-3436-4dd3-a70c-e6e8db1721be` | Subtitle events (Apprise JSON notifier) |
|
||||
| Tinker-Tickets | `6e306faf-8eea-4ba5-83ef-bf8f421f929e` | Custom transformation code |
|
||||
| Ci-Alert | `5e7051e7-fd0c-4930-a711-9c67daf6f0b9` | Gitea Actions `notify-failure` jobs (org secret `MATRIX_WEBHOOK_URL`); transform `hookshot/ci-alert.js` |
|
||||
| Devdesk | `4a3ccfc9-e1fe-4124-b014-7842fe51b9dc` | DevDesk "Claude needs you" (CT 126 `devdesk-notify-matrix`, URL in `/etc/devdesk/matrix-webhook`); transform `hookshot/devdesk.js`; avatar set via the appservice token |
|
||||
| Grafana | `e713b383…` | Unified alerting contact point |
|
||||
| Proxmox | `ca27432c…` | Notification system (8.1+), Discord embed format |
|
||||
| Sonarr | `aeffc311…` | All event types |
|
||||
| Radarr | `34913454…` | All event types |
|
||||
| Readarr | `e57ab4f3…` | All event types |
|
||||
| Lidarr | `66ac6fdd…` | All event types |
|
||||
| Uptime Kuma | `4b3fb94b…` | Status change notifications |
|
||||
| Seerr | `555185af…` | Request/approval events |
|
||||
| Owncast (Livestream) | `9993e911…` | STREAM_STARTED / STREAM_STOPPED |
|
||||
| Bazarr | `470fb267…` | Subtitle events (Apprise JSON notifier) |
|
||||
| Tinker-Tickets | `6e306faf…` | Custom transformation code |
|
||||
| Ci-Alert | `66c1aa17…` | Gitea Actions `notify-failure` jobs (org secret `MATRIX_WEBHOOK_URL`); transform `hookshot/ci-alert.js` |
|
||||
| Devdesk | `4a3ccfc9…` | DevDesk "Claude needs you" (CT 126 `devdesk-notify-matrix`, URL in `/etc/devdesk/matrix-webhook`); transform `hookshot/devdesk.js`; avatar set via the appservice token |
|
||||
|
||||
**Hookshot notes:**
|
||||
- Spam and Stuff is intentionally **unencrypted** — hookshot bridges cannot join E2EE rooms
|
||||
@@ -377,6 +399,121 @@ bash /opt/matrix-config/hookshot/deploy.sh proxmox.js # deploy one
|
||||
|
||||
---
|
||||
|
||||
## Discord Bridge (mautrix-discord v0.7.7)
|
||||
|
||||
Bridges Discord channels to Matrix rooms on LXC 151. The bridge logs in as a **Discord bot**
|
||||
(not anyone's personal account, which breaks Discord's ToS): Discord users appear in Matrix as
|
||||
`@discord_<id>:matrix.lotusguild.org` ghosts, and Matrix users are relayed into Discord through a
|
||||
channel webhook with their own display name.
|
||||
|
||||
- Bridge bot: `@discordbot:matrix.lotusguild.org`
|
||||
- Config: `/opt/mautrix-discord/config.yaml` (template in `discord-bridge/config.yaml`; the bridge
|
||||
rewrites it on start, so it is **not** auto-deployed)
|
||||
- Registration: `/etc/matrix-synapse/discord-registration.yaml` (listed in `app_service_config_files`)
|
||||
- Database: `mautrix_discord` on LXC 109, role `mautrix_discord`, allowed from 10.10.10.29 in `pg_hba.conf`
|
||||
- Service: `systemctl status mautrix-discord`, logs in `journalctl -u mautrix-discord` and `/var/log/mautrix-discord/`
|
||||
- End-to-bridge encryption is allowed, so it can join encrypted rooms
|
||||
|
||||
**Install (one time):** after this repo's `main` has reached `/opt/matrix-config` on LXC 151, run this
|
||||
on the Proxmox node hosting LXC 109 and 151. It restarts Synapse once and is safe to re-run.
|
||||
|
||||
```bash
|
||||
pct exec 151 -- cat /opt/matrix-config/discord-bridge/install.sh | bash
|
||||
```
|
||||
|
||||
**Discord side:** Developer Portal → application → Bot. Turn on the **Message Content** and
|
||||
**Server Members** intents. Invite the bot with the `bot` scope and View Channels, Send Messages,
|
||||
Read Message History, Manage Webhooks, Attach Files, Add Reactions, Manage Messages and Embed Links.
|
||||
|
||||
**Linking a room:**
|
||||
1. DM `@discordbot:matrix.lotusguild.org`: `login-token bot <bot token>` (the token lives only in the bridge DB)
|
||||
2. `guilds bridge <discord server id>` — the server ID comes from Discord Developer Mode → right-click
|
||||
3. In the Matrix room: invite `@discordbot`, then `!discord bridge <channel id>` and `!discord set-relay --create <webhook name>`
|
||||
|
||||
Skip `guilds bridge`: it sets the guild to create a Matrix room for every channel on its first message.
|
||||
`bridge` alone bumps the guild to `if-portal-exists`. To move a link to another room, run
|
||||
`!discord bridge --replace <channel id>` there (never `--replace=delete`, which kicks everyone from the
|
||||
old room). The relay webhook stays with the channel. Keep `@discordbot` at the default power level so it
|
||||
can't overwrite the room's name and icon with the Discord channel's.
|
||||
|
||||
**Bot profile:** `@discordbot` shows as "Discord Bridge" with the Discord logo
|
||||
(`discord-bridge/bot-avatar.png`). To reapply it: `pct exec 151 -- bash /opt/matrix-config/discord-bridge/set-bot-profile.sh`.
|
||||
|
||||
**Who the Discord bot login belongs to:** `@jared` holds it. The account holding the login sends its
|
||||
own messages to Discord *as the bot* ("matrix-bridge APP"), because the bridge prefers a real Discord
|
||||
connection over the webhook. Everyone else is relayed through the channel webhook under their own name
|
||||
and avatar. To change that, log the bot in from a dedicated non-chatting account; that automatically
|
||||
logs out whichever account held it before.
|
||||
|
||||
**Rotating the bot token:** reset it in the Developer Portal, then DM the bridge bot `logout` and
|
||||
`login-token bot <new token>`.
|
||||
|
||||
**Matrix avatars on Discord:** relayed messages carry the sender's avatar as a signed URL under
|
||||
`bridge.public_address` (`https://matrix.lotusguild.org`), which Discord fetches. NPM proxies
|
||||
`/mautrix-discord/avatar/` → `http://10.10.10.29:29334` (hand-added location in
|
||||
`/data/nginx/proxy_host/49.conf` on LXC 139, like `/sfu/get` — **re-add it after any NPM UI save of
|
||||
proxy host 49**). The bridge listens on `0.0.0.0:29334` for this; the appservice API on that port
|
||||
still requires the `hs_token`, and only the avatar path is proxied publicly.
|
||||
|
||||
**Catch-up after downtime:** `backfill.forward_limits.missed.channel: -1`, so Discord messages sent
|
||||
while the bridge or Synapse was down are bridged when it starts again.
|
||||
|
||||
---
|
||||
|
||||
## Voice Bridge (nether-voicebridge, Lotus-patched)
|
||||
|
||||
Bridges Discord voice into a Lotus voice room. People on Discord appear **inside the Matrix call**
|
||||
under their Discord names, with a speaking indicator. People in Lotus appear in the Discord channel
|
||||
as `[Matrix] <name>`, with mute mirrored to Discord.
|
||||
|
||||
| | Text | Voice |
|
||||
|---|---|---|
|
||||
| Discord (Lotus Guild server) | #matrix-bridge | matrix-bridge |
|
||||
| Matrix (Lotus) | Discord Bridge (mautrix-discord) | Discord Voice Bridge (`!yS_ZIHL3sOKQJBt4NiIQyiHKt3cv6HrIDeq7OxDpSM0`) |
|
||||
|
||||
- **Build:** upstream [nether-voicebridge](https://nether.codes/nether/nether-voicebridge) `cf52945`
|
||||
plus 12 patches to report upstream and 1 Lotus-only patch: Discord users without an avatar get
|
||||
Discord's default one. Patches, bug log and issue drafts live in
|
||||
`/root/code/voice-bridge-trial/`. **Don't run the unpatched release**. Without the patches the
|
||||
bridge can't see anyone using current Element Call or Lotus Call (`livekit_alias`), and encrypted
|
||||
voice breaks after a restart on Synapse.
|
||||
- **Accounts:** the bot is `@lotus-voice_bot`, shown as "Discord Voice Bridge" with the Discord logo.
|
||||
It has **no special power** in the room; it only needs calls at power level 0. The room has the
|
||||
Discord logo, a topic, and an `m.bridge` record, so Lotus shows the Discord chip linking to the channel.
|
||||
Discord speakers are `@lotus-voice_<discord id>`. The appservice registration is
|
||||
`/etc/matrix-synapse/lotus-voice-registration.yaml`.
|
||||
- **Discord bots:** Lotus Voice 1–3, one per Matrix person speaking at once. Each has only Connect,
|
||||
Speak, Use Voice Activity and Change Nickname, and none can see #matrix-bridge text.
|
||||
- **Files on LXC 151:**
|
||||
- binary: `/opt/lotus-voice/lotus-voice-bridge`
|
||||
- config: `/etc/lotus-voice/config.toml` (0600, holds the bot tokens)
|
||||
- state: `/var/lib/lotus-voice`
|
||||
- service: `lotus-voice-bridge`, logs via `journalctl -u lotus-voice-bridge`
|
||||
- **Voice limits:** `voice-limit-guard` ignores `@lotus-voice_bot` (`VOICE_LIMIT_EXEMPT_USERS`), so
|
||||
the bot never takes a slot. Discord speakers count like anyone else. When a room is full the
|
||||
bridge stops trying cleanly, and the Discord user just isn't heard.
|
||||
- **Install / upgrade:** on the Proxmox node hosting LXC 151, run
|
||||
`bash voice-bridge/install.sh <binary> <secrets file with BOT1..BOT3>`. The first install
|
||||
registers the appservice, restarts Synapse once and creates the bot account. Then invite
|
||||
`@lotus-voice_bot:matrix.lotusguild.org` to the voice room. **To upgrade:** push the new binary to
|
||||
`/opt/lotus-voice/lotus-voice-bridge` (keep the old one as `.prev`), then run
|
||||
`systemctl restart lotus-voice-bridge`. Synapse isn't touched.
|
||||
|
||||
## Bot profiles
|
||||
|
||||
Every bot account has a proper name and an avatar in one style (white glyph on a coloured square). Image sources are in `avatars/` and `discord-bridge/bot-avatar.png`.
|
||||
|
||||
| Account | Name | How it's set |
|
||||
|---------|------|--------------|
|
||||
| `@discordbot` | Discord Bridge | `discord-bridge/set-bot-profile.sh` (bridge config `appservice.bot`, applied on bridge start) |
|
||||
| `@discord-relay` | Discord Relay | Set by hand while signed in as it (`avatars/discord-relay.png`); holds the Discord bot login |
|
||||
| `@hookshot` | Lotus Webhooks | `bot:` section in `/opt/hookshot/config.yml` on LXC 151 (`avatars/hookshot.png`), applied on hookshot start |
|
||||
| `@draupnir` | Draupnir | Profile API with Draupnir's token (Draupnir doesn't manage its own profile) |
|
||||
| `@lotusbot` | Lotus Bot | Already set |
|
||||
| `@notices` | Server Notices | `server_notices.system_mxid_avatar_url` in `homeserver.yaml` (Lotus logo); needs a Synapse restart |
|
||||
|
||||
---
|
||||
|
||||
## Moderation (Draupnir v2.9.0)
|
||||
|
||||
Draupnir runs on LXC 110, manages moderation across all protected rooms (including the Lotus Guild space) via `#management:matrix.lotusguild.org`.
|
||||
@@ -469,6 +606,16 @@ chmod 600 /etc/cinny-monitor.env
|
||||
|
||||
**Cinny-build webhook token** (header `X-Build-Token` on the `cinny-build` hook): `CINNY_BUILD_TOKEN` in LXC 106's `/etc/webhook/secrets.env`, not in git. Reachable on `10.10.10.6:9001` (`webhook-lotus`); `:9000` is bound to `127.0.0.1`. Note: LotusBot doesn't implement `!cinny-update` at the moment, so nothing calls this hook.
|
||||
|
||||
### Avatar decorations (matrix #22)
|
||||
|
||||
Served from **`https://chat.lotusguild.org/decorations/`**: `<slug>.png` and `thumbs/<slug>.webp`, `Cache-Control: public, max-age=604800`, no cookies. They used to come through Nextcloud's public DAV, which started a PHP session per image and sent no cache headers.
|
||||
|
||||
- **Storage:** Gitea generic package `avatar-decorations` (`https://code.lotusguild.org/api/packages/LotusGuild/generic/avatar-decorations/<version>/`), in ≤150 MB tar parts (the proxy refuses larger uploads). Nothing goes in git except the pin.
|
||||
- **Pin:** `cinny/decorations.sha256`, the sha256 of each part, which names the version.
|
||||
- **Deploy:** `deploy/lxc106-cinny.sh` installs the pinned version when the pin changes (or nothing is installed yet). It downloads the parts, checks them against the pin and against the `MANIFEST.sha256` inside, unpacks to `/var/www/decorations-<version>`, and atomically repoints `/var/www/decorations`. The previous version is kept for rollback; a failed download or checksum leaves the live set unchanged. nginx: `location ^~ /decorations/` in `cinny/nginx.conf`.
|
||||
- **Updating the set:** put the files in a folder (`<slug>.png` + `thumbs/<slug>.webp`) and run `GITEA_TOKEN=… deploy/publish-decorations.sh <folder> <new-version>`. That rewrites the pin; commit it. Add or remove the catalog entries in cinny's `src/app/features/lotus/avatarDecorations.ts`. Use a new version for every change: an image replaced under the same name can be cached for up to a week.
|
||||
- **Rollback:** revert `cinny/decorations.sha256`, or on LXC 106 run `ln -sfn /var/www/decorations-<old>/decorations /var/www/decorations`.
|
||||
|
||||
### Webhook secrets — rotating
|
||||
|
||||
Secrets used to be committed in `deploy/hooks-lxc*.json` in this public repo; all exposed ones were rotated on 2026-09-23 and moved to `secrets.env`. To rotate one:
|
||||
@@ -798,7 +945,7 @@ Leaving a space does **not** leave its child rooms; they are independent rooms w
|
||||
- [ ] `synchronous_commit = off` — **deliberately NOT applied.** Would be a real write-latency win, but this cluster hard-resets every few hours (HA self-fences on corosync quorum loss + the large1 DIMM), so it would drop up to ~600ms of committed messages *per reset* rather than once in a blue moon. Revisit once the cluster is stable.
|
||||
|
||||
### Auth & SSO
|
||||
- [x] Token-based registration
|
||||
- [x] Open registration disabled (`enable_registration: false`, 2026-10-16): accounts come from LLDAP and are created on first sign-in through Lotus SSO (Authelia OIDC, which keeps its own registration on). The old registration token was deleted.
|
||||
- [x] SSO/OIDC via Authelia
|
||||
- [x] `allow_existing_users: true` for linking accounts to SSO
|
||||
- [x] Password auth alongside SSO
|
||||
@@ -809,6 +956,7 @@ Leaving a space does **not** leave its child rooms; they are independent rooms w
|
||||
- [x] Per-service JS transformation functions (stored in git, auto-deployed)
|
||||
- [x] Per-service virtual user avatars
|
||||
- [x] NPM reverse proxy for `/webhook` path
|
||||
- [x] mautrix-discord bridge (bot login + webhook relay) — config and installer in `discord-bridge/`, live since 2026-10-28
|
||||
|
||||
### Room Structure
|
||||
- [x] The Lotus Guild space with all core rooms
|
||||
@@ -848,6 +996,47 @@ Leaving a space does **not** leave its child rooms; they are independent rooms w
|
||||
|
||||
---
|
||||
|
||||
## Hookshot Upgrade Notes
|
||||
|
||||
Hookshot is a **git checkout built from source** at `/opt/hookshot` (`ExecStart=node lib/App/BridgeApp.js`).
|
||||
Only `config.yml` and `passkey.pem` in it are not generated; storage is in-memory (connections are room state).
|
||||
|
||||
- **7.4.1+ builds with pnpm**, and `scripts/build-app.sh` calls `pnpm` directly. Without a global pnpm,
|
||||
put a wrapper first in `PATH`: `printf '#!/bin/sh\nexec corepack pnpm@<version> "$@"\n'` (version from
|
||||
`devEngines.packageManager` in `package.json`). The Rust layer needs `~/.cargo/bin` in `PATH`.
|
||||
- **7.6.0 drops Node 22** (LXC 151 runs Node 22), so 7.5.0 is the newest that runs as-is.
|
||||
- Build the new tag in a separate directory (`git clone --depth 1 --branch <tag> … /opt/hookshot-<tag>`,
|
||||
`pnpm install --frozen-lockfile && pnpm run build`), copy in `config.yml` + `passkey.pem`, then stop the
|
||||
service, swap the directories (keep the old one for rollback) and start it. Check the log says
|
||||
`Bridge is now ready. Found N connections`.
|
||||
- 2026-11-03: 7.3.2 → 7.5.0 (GHSA-5c49-6fvm-2xvc: `/metrics` exposed webhook URLs, plus two DoS fixes).
|
||||
Old build kept at `/opt/hookshot-7.3.2`.
|
||||
|
||||
## Call Stack Upgrade (lk-jwt-service 0.4.1 → 0.9.0, LiveKit 1.9.11 → 1.13.11) — planned
|
||||
|
||||
Tested on the local stack on 2026-11-03 (calls through the guard, voice-bridge e2e audio both ways,
|
||||
encrypted and not). Required changes, all on LXC 151:
|
||||
|
||||
1. **lk-jwt-service 0.9.0** (a Rust rewrite; fixes GHSA-rq24-fh66-rq7x). Existing env vars carry over.
|
||||
Add `LIVEKIT_SANITY_CHECK_INTERVAL_SECONDS=30`.
|
||||
2. **LiveKit webhook → lk-jwt.** 0.9.0 serves `/delegate_delayed_leave`, so Element Call hands it the
|
||||
job of removing a crashed client's call membership and sets its own fallback timer to **1 hour**.
|
||||
lk-jwt only learns that someone left from LiveKit webhooks; without them crashed clients linger for an
|
||||
hour (also on Discord, via the voice bridge). In `/etc/livekit/config.yaml`:
|
||||
```yaml
|
||||
webhook:
|
||||
api_key: <the key under keys:, same as LIVEKIT_KEY>
|
||||
urls:
|
||||
- http://127.0.0.1:8071/sfu_webhook
|
||||
```
|
||||
3. **`prometheus_port: 6789` → `prometheus: {port: 6789}`.** LiveKit 1.13.8 removed the old key (1.9.11
|
||||
already accepts the new one). Otherwise metrics and the *LiveKit Down* alert stop working.
|
||||
4. Restart lk-jwt-service only when no calls are active: its leave jobs are in memory (or set
|
||||
`LIVEKIT_REDIS_URL`). LiveKit: replace the binary and `touch /run/livekit-restart-pending`.
|
||||
|
||||
Not affected: TURN (external coturn with `ttl` set, as 1.13.1 requires), `room.auto_create: false`,
|
||||
the voice bridge (uses the legacy `/sfu/get`, still served).
|
||||
|
||||
## Synapse Upgrade Runbook
|
||||
|
||||
Synapse is installed from the **matrix.org apt repo** (`matrix-synapse-py3`) on **LXC 151** — it is
|
||||
@@ -933,6 +1122,7 @@ Checklist in this file.
|
||||
| PostgreSQL Down | `pg_up` < 1 for 2m | critical |
|
||||
| LiveKit Down | `up{job="livekit"}` < 1 for 2m | critical |
|
||||
| Hookshot Down | `up{job="hookshot"}` < 1 for 2m | critical |
|
||||
| Discord Bridge Down | `node_systemd_unit_state{name="mautrix-discord.service",state="active"}` < 1 (or no data) for 3m | critical |
|
||||
| Draupnir Down | `up{job="draupnir-node"}` < 0.5 for 2m | critical |
|
||||
| PG Connection Saturation | connections > 80% of max for 5m | warning |
|
||||
| Federation Queue Backing Up | pending PDUs > 100 for 10m | warning |
|
||||
@@ -1039,10 +1229,11 @@ All commands use the `!` prefix. Run `!help` in any room for the full list.
|
||||
| Database | PostgreSQL | 17.9 |
|
||||
| TURN | coturn | latest |
|
||||
| Video/voice calls | LiveKit SFU | 1.9.11 |
|
||||
| LiveKit JWT | lk-jwt-service | latest |
|
||||
| LiveKit JWT | lk-jwt-service | 0.4.1 (0.9.0 planned, see *Call stack upgrade*) |
|
||||
| Moderation | Draupnir | 2.9.0 |
|
||||
| SSO | Authelia (OIDC) + LLDAP | — |
|
||||
| Webhook bridge | matrix-hookshot | 7.3.2 |
|
||||
| Webhook bridge | matrix-hookshot | 7.5.0 |
|
||||
| Discord bridge | mautrix-discord | 0.7.7 |
|
||||
| Reverse proxy | Nginx Proxy Manager | — |
|
||||
| Web client | Lotus Cinny (fork of `cinnyapp/cinny` main) | custom |
|
||||
| Element Call embed | `@lotusguild/element-call-embedded` (self-built fork of `element-hq/element-call`) | 0.20.1-lotus.1 |
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
+10
-3
@@ -8,9 +8,16 @@
|
||||
"allowCustomHomeservers": false,
|
||||
"featuredCommunities": {
|
||||
"openAsDefault": false,
|
||||
"spaces": [],
|
||||
"rooms": [],
|
||||
"servers": []
|
||||
"spaces": [
|
||||
"!-1ZBnAH-JiCOV8MGSKN77zDGTuI3pgSdy8Unu_DrDyc",
|
||||
"#homelab:codestorm.net"
|
||||
],
|
||||
"rooms": [
|
||||
"#jellyfin:matrix.org"
|
||||
],
|
||||
"servers": [
|
||||
"matrixrooms.info"
|
||||
]
|
||||
},
|
||||
"hashRouter": {
|
||||
"enabled": false,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
a7aacaa65cb06e4b1c990b9253362f2eb148aae72e2e11c396d34e899792d68d avatar-decorations-1.0.0.part1.tar
|
||||
a6919d8bb8e1c2f838b0f9acdbc1131cbfd7bfe5fe9c373b25f406474bd41095 avatar-decorations-1.0.0.part2.tar
|
||||
fb7624f2470659d933463187d2afe73428d5554291f62484c8a28fac6196f427 avatar-decorations-1.0.0.part3.tar
|
||||
909e07db0134b29258514acf4d598bb467aff8b157f0767b6c3afeadc1eb048c avatar-decorations-1.0.0.part4.tar
|
||||
+60
-1
@@ -160,7 +160,66 @@ echo "[$(date '+%Y-%m-%d %H:%M:%S')] Deploying to $WEBROOT..."
|
||||
# /var/www/html/config.json by lxc106-cinny.sh. The build ships a DEV default
|
||||
# (allowCustomHomeservers:true); rsyncing it would clobber the production config
|
||||
# on every deploy. Keep the app bundle and the runtime config separate.
|
||||
rsync -a --delete --exclude config.json dist/ "$WEBROOT/"
|
||||
# [matrix #23] Keep the previous builds' hashed assets for a while: a browser
|
||||
# still holding an older index.html (or service-worker precache) asks for its
|
||||
# assets/index-<old hash>.js, and deleting them on every deploy broke the app
|
||||
# for those users until their cached shell expired. Prune after 14 days.
|
||||
# The asset excludes are ANCHORED (leading /): an unanchored `assets/` also
|
||||
# matched public/element-call/assets/, so the call page's index.html was
|
||||
# updated while its hashed scripts never were, and calls failed to load.
|
||||
# config.json stays unanchored on purpose: public/element-call/config.json is
|
||||
# the production call config too.
|
||||
rsync -a --delete --exclude config.json \
|
||||
--exclude /assets/ --exclude /public/element-call/assets/ dist/ "$WEBROOT/"
|
||||
for dir in assets public/element-call/assets; do
|
||||
mkdir -p "$WEBROOT/$dir"
|
||||
rsync -a "dist/$dir/" "$WEBROOT/$dir/"
|
||||
find "$WEBROOT/$dir" -type f -mtime +14 -delete
|
||||
done
|
||||
|
||||
# Every script/stylesheet the app and call pages reference must exist in the
|
||||
# webroot. 2026-10-20: the call page's index.html pointed at scripts the deploy
|
||||
# never copied and calls failed to load; this check would have caught it.
|
||||
missing_assets() { # <index.html> <its directory>
|
||||
grep -oE '(src|href)="[^"]+\.(js|css)"' "$1" | sed -E 's/^(src|href)="//; s/"$//' |
|
||||
while read -r ref; do
|
||||
case "$ref" in
|
||||
http://*|https://*|//*) continue ;;
|
||||
/*) path="$WEBROOT$ref" ;;
|
||||
*) path="$2/${ref#./}" ;;
|
||||
esac
|
||||
[ -f "$path" ] || echo "$ref"
|
||||
done
|
||||
}
|
||||
deploy_alert() { # best effort: the upstream checker's Matrix credentials
|
||||
[ -r /etc/cinny-monitor.env ] || return 0
|
||||
(
|
||||
set -a
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/cinny-monitor.env
|
||||
set +a
|
||||
_ALERT="$1" python3 - <<'PYEOF'
|
||||
import json, os, time, urllib.parse, urllib.request
|
||||
server = os.environ.get("MATRIX_SERVER", "").rstrip("/")
|
||||
room, token = os.environ.get("MATRIX_ROOM", ""), os.environ.get("MATRIX_TOKEN", "")
|
||||
if server and room and token:
|
||||
url = f"{server}/_matrix/client/v3/rooms/{urllib.parse.quote(room, safe='')}/send/m.room.message/deploy{int(time.time() * 1000)}"
|
||||
req = urllib.request.Request(url, method="PUT", data=json.dumps({"msgtype": "m.text", "body": os.environ["_ALERT"]}).encode(),
|
||||
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"})
|
||||
try:
|
||||
urllib.request.urlopen(req, timeout=10)
|
||||
except Exception as exc:
|
||||
print(f"alert failed: {exc}")
|
||||
PYEOF
|
||||
) || true
|
||||
}
|
||||
MISSING=$(missing_assets "$WEBROOT/index.html" "$WEBROOT"; missing_assets "$WEBROOT/public/element-call/index.html" "$WEBROOT/public/element-call")
|
||||
if [ -n "$MISSING" ]; then
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: deployed pages reference missing files:"
|
||||
echo "$MISSING"
|
||||
deploy_alert "⚠️ Lotus Chat deploy ($VITE_APP_VERSION): the live pages reference files that are not on the server, so the app or calls may not load: $(echo "$MISSING" | tr '\n' ' ')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ===== Deploy complete ($VITE_APP_VERSION) ====="
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
||||
add_header Permissions-Policy 'accelerometer=(), autoplay=(self "https://call.chat.lotusguild.org"), camera=(self "https://call.chat.lotusguild.org"), display-capture=(self "https://call.chat.lotusguild.org"), encrypted-media=(self), fullscreen=(self), geolocation=(self), gyroscope=(), magnetometer=(), microphone=(self "https://call.chat.lotusguild.org"), midi=(), payment=(), usb=()' always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://matrix.lotusguild.org https://matrix.org https://*.matrix.org https://mozilla.org https://mozilla.modular.im https://drive.lotusguild.org https://media.giphy.com https://media0.giphy.com https://media1.giphy.com https://media2.giphy.com https://media3.giphy.com https://media4.giphy.com https://www.openstreetmap.org https://tile.openstreetmap.org; font-src 'self' data:; connect-src 'self' https://matrix.lotusguild.org wss://matrix.lotusguild.org https://isitup.lotusguild.org https://matrix.org https://*.matrix.org https://mozilla.org https://mozilla.modular.im https://chat.mozilla.org https://vector.im https://api.giphy.com https://*.giphy.com wss:; media-src 'self' https: blob:; frame-src 'self' https:; worker-src 'self' blob:; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self';" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://matrix.lotusguild.org https://matrix.org https://*.matrix.org https://mozilla.org https://mozilla.modular.im https://drive.lotusguild.org https://media.giphy.com https://media0.giphy.com https://media1.giphy.com https://media2.giphy.com https://media3.giphy.com https://media4.giphy.com https://www.openstreetmap.org https://tile.openstreetmap.org; font-src 'self' data:; connect-src 'self' https://matrix.lotusguild.org wss://matrix.lotusguild.org https://isitup.lotusguild.org https://matrix.org https://*.matrix.org https://mozilla.org https://mozilla.modular.im https://chat.mozilla.org https://www.mozilla.org https://vector.im https://api.giphy.com https://*.giphy.com https://www.tiktok.com wss:; media-src 'self' https: blob:; frame-src 'self' https:; worker-src 'self' blob:; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self';" always;
|
||||
@@ -1,3 +1,31 @@
|
||||
# [matrix #23] SPA routes (/, /home/…, /login/…) are rewritten to /index.html
|
||||
# inside `location /`, where no cache headers were set: browsers then reused a
|
||||
# heuristically fresh shell after a deploy and requested deleted assets. Only
|
||||
# the rewritten shell gets no-cache; other files there keep their defaults.
|
||||
map $uri $lotus_shell_cache_control {
|
||||
/index.html "no-cache, no-store, must-revalidate";
|
||||
default "";
|
||||
}
|
||||
|
||||
# All traffic arrives through Nginx Proxy Manager (10.10.10.27), so without
|
||||
# realip every visitor shared ONE chat_limit bucket (20 r/s, keyed by
|
||||
# $binary_remote_addr = the proxy): a scanner burst got real users 503s.
|
||||
# Each server block below trusts X-Real-IP from the proxy only (NPM sets it
|
||||
# to the client address, overwriting anything the client sent).
|
||||
#
|
||||
# [matrix #22] Decorations get their own, larger budget: opening the profile
|
||||
# decoration picker can fetch hundreds of thumbnails, which would otherwise use
|
||||
# up chat_limit and 503 the app's own files.
|
||||
limit_req_zone $binary_remote_addr zone=decorations_limit:10m rate=100r/s;
|
||||
#
|
||||
# [cinny #201 follow-up] Content-hashed app files (js/css/fonts/images/wasm)
|
||||
# likewise: a cold page load fires ~75 requests within a second, and the
|
||||
# service worker precaches all ~126 build files at once (every deploy renames
|
||||
# them), both past chat_limit's burst of 60, so chunks 503ed and pages
|
||||
# rendered blank / the precache install failed. Immutable files, cheap to
|
||||
# serve; pages and the webhook keep chat_limit.
|
||||
limit_req_zone $binary_remote_addr zone=assets_limit:10m rate=100r/s;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -14,6 +42,8 @@ server {
|
||||
server_tokens off;
|
||||
client_max_body_size 50m;
|
||||
|
||||
set_real_ip_from 10.10.10.27;
|
||||
real_ip_header X-Real-IP;
|
||||
limit_req zone=chat_limit burst=60 nodelay;
|
||||
limit_conn chat_conn 25;
|
||||
index index.html;
|
||||
@@ -63,6 +93,8 @@ server {
|
||||
}
|
||||
location ~* \.(?:js|css|woff2?|png|svg|ico|webp|wasm)$ {
|
||||
include snippets/cinny-security-headers-framed.conf;
|
||||
# Own budget (replaces the server-level chat_limit; see assets_limit).
|
||||
limit_req zone=assets_limit burst=400 nodelay;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable" always;
|
||||
}
|
||||
@@ -71,6 +103,8 @@ server {
|
||||
# Cache content-addressed static assets aggressively
|
||||
location ~* \.(?:js|css|woff2?|png|svg|ico|webp)$ {
|
||||
include snippets/cinny-security-headers.conf;
|
||||
# Own budget (replaces the server-level chat_limit; see assets_limit).
|
||||
limit_req zone=assets_limit burst=400 nodelay;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable" always;
|
||||
}
|
||||
@@ -98,7 +132,24 @@ server {
|
||||
proxy_connect_timeout 5;
|
||||
}
|
||||
|
||||
# [matrix #22] Avatar decorations, installed by deploy/lxc106-cinny.sh from
|
||||
# the Gitea generic package (outside the web root, so app deploys'
|
||||
# rsync --delete never touches them). ^~ beats the image regex below: these
|
||||
# can be replaced in place under the same name, so a week, not immutable.
|
||||
location ^~ /decorations/ {
|
||||
alias /var/www/decorations/;
|
||||
# Replaces the server-level chat_limit here (nginx doesn't inherit
|
||||
# limit_req into a location that sets its own).
|
||||
limit_req zone=decorations_limit burst=700 nodelay;
|
||||
include snippets/cinny-security-headers.conf;
|
||||
add_header Cache-Control "public, max-age=604800" always;
|
||||
location ~ /MANIFEST\.sha256$ { return 404; }
|
||||
}
|
||||
|
||||
location / {
|
||||
# add_header here drops the server-level headers, so include them again.
|
||||
include snippets/cinny-security-headers.conf;
|
||||
add_header Cache-Control $lotus_shell_cache_control always;
|
||||
rewrite ^/config\.json$ /config.json break;
|
||||
rewrite ^/manifest\.json$ /manifest.json break;
|
||||
rewrite ^/sw\.js$ /sw.js break;
|
||||
@@ -128,6 +179,8 @@ server {
|
||||
|
||||
root /var/www/html;
|
||||
server_tokens off;
|
||||
set_real_ip_from 10.10.10.27;
|
||||
real_ip_header X-Real-IP;
|
||||
limit_req zone=chat_limit burst=60 nodelay;
|
||||
limit_conn chat_conn 25;
|
||||
|
||||
@@ -148,6 +201,8 @@ server {
|
||||
}
|
||||
location ~* \.(?:js|css|woff2?|png|svg|ico|webp|wasm)$ {
|
||||
include snippets/cinny-security-headers-call.conf;
|
||||
# Own budget (replaces the server-level chat_limit; see assets_limit).
|
||||
limit_req zone=assets_limit burst=400 nodelay;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable" always;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Checks every 5 minutes if a livekit restart is pending.
|
||||
# Only restarts when there are no active WebSocket connections on port 7881
|
||||
# (established connections = active call participants).
|
||||
# Only restarts when LiveKit reports no participants AND nobody holds a
|
||||
# signalling connection, so a restart never drops a call.
|
||||
# Run by: livekit-graceful-restart.timer (systemd)
|
||||
|
||||
if [ ! -f /run/livekit-restart-pending ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Count established WebSocket signaling connections on livekit port 7881
|
||||
ACTIVE=$(ss -tn state established '( dport = :7881 or sport = :7881 )' | grep -c ESTAB || true)
|
||||
# Participants LiveKit itself counts, across all rooms. Counting TCP connections
|
||||
# on :7881 (the old check) only saw clients on the ICE-TCP fallback: signalling
|
||||
# is on :7880 and media is normally UDP, so most calls looked idle.
|
||||
METRICS_URL="${LIVEKIT_METRICS_URL:-http://127.0.0.1:6789/metrics}"
|
||||
if ! METRICS=$(curl -sf --max-time 5 "$METRICS_URL") \
|
||||
|| ! printf '%s\n' "$METRICS" | grep -q '^livekit_participant_total'; then
|
||||
echo "$(date): Livekit restart pending but its metrics are unreadable — assuming a call is active, waiting."
|
||||
exit 0
|
||||
fi
|
||||
PARTICIPANTS=$(printf '%s\n' "$METRICS" | awk '/^livekit_participant_total/ {s += $NF} END {printf "%d", s}')
|
||||
|
||||
if [ "$ACTIVE" -gt 0 ]; then
|
||||
echo "$(date): Livekit restart pending but $ACTIVE active connection(s) — waiting."
|
||||
# Belt and braces: open signalling WebSockets (a client mid-join may not be a
|
||||
# participant yet). Count lines (-H drops the header): with a `state` filter ss
|
||||
# omits the State column, so the old `grep -c ESTAB` was always 0.
|
||||
SIGNALLING=$(ss -Htn state established '( sport = :7880 )' | wc -l)
|
||||
|
||||
if [ "$PARTICIPANTS" -gt 0 ] || [ "$SIGNALLING" -gt 0 ]; then
|
||||
echo "$(date): Livekit restart pending but $PARTICIPANTS participant(s), $SIGNALLING signalling connection(s) — waiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
+50
-1
@@ -16,7 +16,7 @@ echo "=== $(date) === LXC106 deploy triggered ==="
|
||||
|
||||
if [ ! -d "$REPO_DIR/.git" ]; then
|
||||
git clone "$CLONE_URL" "$REPO_DIR"
|
||||
CHANGED="cinny/config.json cinny/nginx.conf cinny/upstream-check.sh cinny/lotus-build.sh cinny/lotus_deploy.sh deploy/hooks-lxc106.json systemd/cinny-upstream-check.cron"
|
||||
CHANGED="cinny/config.json cinny/decorations.sha256 cinny/nginx.conf cinny/upstream-check.sh cinny/lotus-build.sh cinny/lotus_deploy.sh deploy/hooks-lxc106.json systemd/cinny-upstream-check.cron"
|
||||
else
|
||||
cd "$REPO_DIR"
|
||||
git fetch --all
|
||||
@@ -63,6 +63,55 @@ PY
|
||||
fi
|
||||
fi
|
||||
|
||||
# [matrix #22] Avatar decorations: a versioned Gitea generic package, pinned
|
||||
# (version + sha256 of each part) in cinny/decorations.sha256, installed to
|
||||
# /var/www/decorations-<version> and served by nginx at /decorations/. Runs on a
|
||||
# pin change or when nothing is installed yet. A failed download or checksum
|
||||
# leaves the live set untouched; the previous version is kept for rollback.
|
||||
install_decorations() {
|
||||
local pin="$REPO_DIR/cinny/decorations.sha256"
|
||||
local ver base tmp dest
|
||||
ver=$(grep -oE 'avatar-decorations-[0-9][^ ]*\.part1\.tar' "$pin" | sed -E 's/^avatar-decorations-(.*)\.part1\.tar$/\1/')
|
||||
[ -n "$ver" ] || { echo "✗ decorations: no version in $pin"; return 1; }
|
||||
dest="/var/www/decorations-$ver"
|
||||
if [ -d "$dest/decorations" ] && [ "$(readlink -f /var/www/decorations)" = "$dest/decorations" ]; then
|
||||
echo "decorations $ver already live"; return 0
|
||||
fi
|
||||
base="https://code.lotusguild.org/api/packages/LotusGuild/generic/avatar-decorations/$ver"
|
||||
tmp=$(mktemp -d /var/www/.decorations-XXXXXX)
|
||||
# Every step checks its own exit status: `set -e` does not apply inside a
|
||||
# subshell on the left of `||`, so a failed checksum would be ignored.
|
||||
if ! (
|
||||
cd "$tmp" || exit 1
|
||||
cp "$pin" SHA256SUMS || exit 1
|
||||
while read -r _ f; do
|
||||
curl -fsSL --retry 3 -o "$f" "$base/$f" || exit 1
|
||||
done < SHA256SUMS
|
||||
sha256sum -c --quiet SHA256SUMS || exit 1
|
||||
while read -r _ f; do
|
||||
tar -xf "$f" || exit 1
|
||||
rm -f "$f"
|
||||
done < SHA256SUMS
|
||||
cd decorations || exit 1
|
||||
sha256sum -c --quiet MANIFEST.sha256 || exit 1
|
||||
); then
|
||||
echo "✗ decorations $ver: download/verify failed — live set unchanged"
|
||||
rm -rf "$tmp"
|
||||
return 1
|
||||
fi
|
||||
rm -rf "$dest"; mkdir -p "$dest"; mv "$tmp/decorations" "$dest/decorations"; rm -rf "$tmp"
|
||||
chmod -R a+rX "$dest"
|
||||
ln -sfn "$dest/decorations" /var/www/decorations.new && mv -T /var/www/decorations.new /var/www/decorations
|
||||
# Keep the live version and the one before it; drop older ones.
|
||||
find /var/www -maxdepth 1 -name 'decorations-*' -type d -printf '%T@ %p\n' | sort -rn \
|
||||
| tail -n +3 | cut -d' ' -f2- | xargs -r rm -rf
|
||||
echo "✓ decorations $ver live at /var/www/decorations ($(find "$dest/decorations" -maxdepth 1 -name '*.png' | wc -l) images)"
|
||||
}
|
||||
if echo "$CHANGED" | grep -q '^cinny/decorations.sha256' || [ ! -e /var/www/decorations ]; then
|
||||
echo "Deploying avatar decorations..."
|
||||
install_decorations || true
|
||||
fi
|
||||
|
||||
if echo "$CHANGED" | grep -q '^cinny/nginx.conf'; then
|
||||
echo "Deploying cinny nginx site config..."
|
||||
# Back up the live config, swap in the repo copy, and validate before
|
||||
|
||||
@@ -47,6 +47,13 @@ else
|
||||
echo "Restart pending — will apply when no active calls."
|
||||
fi
|
||||
|
||||
# The graceful-restart check itself (run by livekit-graceful-restart.timer)
|
||||
if echo "$CHANGED" | grep -q '^deploy/livekit-graceful-restart\.sh'; then
|
||||
echo "Deploying livekit-graceful-restart.sh..."
|
||||
bash -n "$REPO_DIR/deploy/livekit-graceful-restart.sh" \
|
||||
&& install -m755 "$REPO_DIR/deploy/livekit-graceful-restart.sh" /usr/local/bin/livekit-graceful-restart.sh
|
||||
fi
|
||||
|
||||
# Voice-limit / quality guard (fronts lk-jwt-service on :8070)
|
||||
if echo "$CHANGED" | grep -qE '^livekit/voice-limit-guard\.py|^systemd/voice-limit-guard\.service'; then
|
||||
echo "Deploying voice-limit-guard..."
|
||||
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
# Publish a new avatar-decorations version to the Gitea generic package
|
||||
# registry and write the pin that LXC 106's deploy installs (matrix #22).
|
||||
#
|
||||
# GITEA_TOKEN=… deploy/publish-decorations.sh <dir> <version>
|
||||
#
|
||||
# <dir> holds <slug>.png files and thumbs/<slug>.webp (the same layout the app
|
||||
# requests). The set is split into ≤150 MB tar parts (the registry's proxy
|
||||
# refuses large uploads), each part is uploaded, and cinny/decorations.sha256
|
||||
# is rewritten. Commit that file to deploy; nothing changes until you do.
|
||||
set -euo pipefail
|
||||
SRC=${1:?usage: publish-decorations.sh <dir> <version>}
|
||||
VER=${2:?usage: publish-decorations.sh <dir> <version>}
|
||||
: "${GITEA_TOKEN:?set GITEA_TOKEN (package write scope)}"
|
||||
REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||
BASE="https://code.lotusguild.org/api/packages/LotusGuild/generic/avatar-decorations/$VER"
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
mkdir -p "$WORK/decorations/thumbs"
|
||||
cp "$SRC"/*.png "$WORK/decorations/"
|
||||
cp "$SRC"/thumbs/*.webp "$WORK/decorations/thumbs/"
|
||||
cd "$WORK"
|
||||
for f in decorations/*.png; do
|
||||
s=$(basename "$f" .png)
|
||||
[ -f "decorations/thumbs/$s.webp" ] || { echo "missing thumbs/$s.webp" >&2; exit 1; }
|
||||
done
|
||||
(cd decorations && find . -type f \( -name '*.png' -o -name '*.webp' \) | sort | xargs sha256sum > MANIFEST.sha256)
|
||||
|
||||
python3 - "$VER" <<'PY'
|
||||
import os, subprocess, sys
|
||||
ver, root, limit = sys.argv[1], 'decorations', 150 * 1024 * 1024
|
||||
files = sorted(os.path.join(root, f) for f in os.listdir(root) if f.endswith('.png'))
|
||||
first = [os.path.join(root, 'MANIFEST.sha256')] + sorted(os.path.join(root, 'thumbs', t) for t in os.listdir(os.path.join(root, 'thumbs')))
|
||||
parts, cur, size = [], list(first), sum(os.path.getsize(f) for f in first)
|
||||
for f in files:
|
||||
if size + os.path.getsize(f) > limit and cur:
|
||||
parts.append(cur); cur, size = [], 0
|
||||
cur.append(f); size += os.path.getsize(f)
|
||||
parts.append(cur)
|
||||
for i, p in enumerate(parts, 1):
|
||||
lst = f'part{i}.list'
|
||||
open(lst, 'w').write('\n'.join(p) + '\n')
|
||||
subprocess.run(['tar', '--sort=name', '--owner=0', '--group=0', '--mtime=@0', '-cf',
|
||||
f'avatar-decorations-{ver}.part{i}.tar', '-T', lst], check=True)
|
||||
PY
|
||||
|
||||
sha256sum avatar-decorations-"$VER".part*.tar > SHA256SUMS
|
||||
for f in avatar-decorations-"$VER".part*.tar SHA256SUMS; do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -X PUT -H "Authorization: token $GITEA_TOKEN" \
|
||||
--upload-file "$f" "$BASE/$f")
|
||||
[ "$code" = 201 ] || { echo "upload of $f failed: HTTP $code" >&2; exit 1; }
|
||||
echo "uploaded $f"
|
||||
done
|
||||
cp SHA256SUMS "$REPO_ROOT/cinny/decorations.sha256"
|
||||
echo "Pinned $VER in cinny/decorations.sha256: commit it to deploy."
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,386 @@
|
||||
# Homeserver details.
|
||||
homeserver:
|
||||
# The address that this appservice can use to connect to the homeserver.
|
||||
address: http://127.0.0.1:8008
|
||||
# The domain of the homeserver (also known as server_name, used for MXIDs, etc).
|
||||
domain: matrix.lotusguild.org
|
||||
|
||||
# What software is the homeserver running?
|
||||
# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
|
||||
software: standard
|
||||
# The URL to push real-time bridge status to.
|
||||
# If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
|
||||
# The bridge will use the appservice as_token to authorize requests.
|
||||
status_endpoint: null
|
||||
# Endpoint for reporting per-message status.
|
||||
message_send_checkpoint_endpoint: null
|
||||
# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
|
||||
async_media: false
|
||||
|
||||
# Should the bridge use a websocket for connecting to the homeserver?
|
||||
# The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
|
||||
# mautrix-asmux (deprecated), and hungryserv (proprietary).
|
||||
websocket: false
|
||||
# How often should the websocket be pinged? Pinging will be disabled if this is zero.
|
||||
ping_interval_seconds: 0
|
||||
|
||||
# Application service host/registration related details.
|
||||
# Changing these values requires regeneration of the registration.
|
||||
appservice:
|
||||
# The address that the homeserver can use to connect to this appservice.
|
||||
address: http://127.0.0.1:29334
|
||||
|
||||
# The hostname and port where this appservice should listen.
|
||||
hostname: 0.0.0.0
|
||||
port: 29334
|
||||
|
||||
# Database config.
|
||||
database:
|
||||
# The database type. "sqlite3-fk-wal" and "postgres" are supported.
|
||||
type: postgres
|
||||
# The database URI.
|
||||
# SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
|
||||
# https://github.com/mattn/go-sqlite3#connection-string
|
||||
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
|
||||
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
|
||||
# Password is filled in on the server by install.sh; never commit it.
|
||||
uri: postgres://mautrix_discord:DB_PASSWORD@10.10.10.44/mautrix_discord?sslmode=disable
|
||||
# Maximum number of connections. Mostly relevant for Postgres.
|
||||
max_open_conns: 20
|
||||
max_idle_conns: 2
|
||||
# Maximum connection idle time and lifetime before they're closed. Disabled if null.
|
||||
# Parsed with https://pkg.go.dev/time#ParseDuration
|
||||
max_conn_idle_time: null
|
||||
max_conn_lifetime: null
|
||||
|
||||
# The unique ID of this appservice.
|
||||
id: discord
|
||||
# Appservice bot details.
|
||||
bot:
|
||||
# Username of the appservice bot.
|
||||
username: discordbot
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
displayname: Discord Bridge
|
||||
avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
|
||||
|
||||
# Whether or not to receive ephemeral events via appservice transactions.
|
||||
# Requires MSC2409 support (i.e. Synapse 1.22+).
|
||||
ephemeral_events: true
|
||||
|
||||
# Should incoming events be handled asynchronously?
|
||||
# This may be necessary for large public instances with lots of messages going through.
|
||||
# However, messages will not be guaranteed to be bridged in the same order they were sent in.
|
||||
async_transactions: false
|
||||
|
||||
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
||||
as_token: "This value is generated when generating the registration"
|
||||
hs_token: "This value is generated when generating the registration"
|
||||
|
||||
# Bridge config
|
||||
bridge:
|
||||
# Localpart template of MXIDs for Discord users.
|
||||
# {{.}} is replaced with the internal ID of the Discord user.
|
||||
username_template: discord_{{.}}
|
||||
# Displayname template for Discord users. This is also used as the room name in DMs if private_chat_portal_meta is enabled.
|
||||
# Available variables:
|
||||
# .ID - Internal user ID
|
||||
# .Username - Legacy display/username on Discord
|
||||
# .GlobalName - New displayname on Discord
|
||||
# .Discriminator - The 4 numbers after the name on Discord
|
||||
# .Bot - Whether the user is a bot
|
||||
# .System - Whether the user is an official system user
|
||||
# .Webhook - Whether the user is a webhook and is not an application
|
||||
# .Application - Whether the user is an application
|
||||
displayname_template: '{{if .Webhook}}Webhook{{else}}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{{end}}'
|
||||
# Displayname template for Discord channels (bridged as rooms, or spaces when type=4).
|
||||
# Available variables:
|
||||
# .Name - Channel name, or user displayname (pre-formatted with displayname_template) in DMs.
|
||||
# .ParentName - Parent channel name (used for categories).
|
||||
# .GuildName - Guild name.
|
||||
# .NSFW - Whether the channel is marked as NSFW.
|
||||
# .Type - Channel type (see values at https://github.com/bwmarrin/discordgo/blob/v0.25.0/structs.go#L251-L267)
|
||||
channel_name_template: '{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}'
|
||||
# Displayname template for Discord guilds (bridged as spaces).
|
||||
# Available variables:
|
||||
# .Name - Guild name
|
||||
guild_name_template: '{{.Name}}'
|
||||
# Whether to explicitly set the avatar and room name for private chat portal rooms.
|
||||
# If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
|
||||
# If set to `always`, all DM rooms will have explicit names and avatars set.
|
||||
# If set to `never`, DM rooms will never have names and avatars set.
|
||||
private_chat_portal_meta: default
|
||||
|
||||
# Publicly accessible base URL that Discord can use to reach the bridge, used for avatars in relay mode.
|
||||
# If not set, avatars will not be bridged. Only the /mautrix-discord/avatar/{server}/{id}/{hash} endpoint is used on this address.
|
||||
# This should not have a trailing slash, the endpoint above will be appended to the provided address.
|
||||
public_address: https://matrix.lotusguild.org
|
||||
# A random key used to sign the avatar URLs. The bridge will only accept requests with a valid signature.
|
||||
avatar_proxy_key: generate
|
||||
|
||||
portal_message_buffer: 128
|
||||
|
||||
# Number of private channel portals to create on bridge startup.
|
||||
# Other portals will be created when receiving messages.
|
||||
startup_private_channel_create_limit: 5
|
||||
# Should the bridge send a read receipt from the bridge bot when a message has been sent to Discord?
|
||||
delivery_receipts: false
|
||||
# Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
|
||||
message_status_events: false
|
||||
# Whether the bridge should send error notices via m.notice events when a message fails to bridge.
|
||||
message_error_notices: true
|
||||
# Should the bridge use space-restricted join rules instead of invite-only for guild rooms?
|
||||
# This can avoid unnecessary invite events in guild rooms when members are synced in.
|
||||
restricted_rooms: false
|
||||
# Should the bridge automatically join the user to threads on Discord when the thread is opened on Matrix?
|
||||
# This only works with clients that support thread read receipts (MSC3771 added in Matrix v1.4).
|
||||
autojoin_thread_on_open: true
|
||||
# Should inline fields in Discord embeds be bridged as HTML tables to Matrix?
|
||||
# Tables aren't supported in all clients, but are the only way to emulate the Discord inline field UI.
|
||||
embed_fields_as_tables: true
|
||||
# Should guild channels be muted when the portal is created? This only meant for single-user instances,
|
||||
# it won't mute it for all users if there are multiple Matrix users in the same Discord guild.
|
||||
mute_channels_on_create: false
|
||||
# Should the bridge update the m.direct account data event when double puppeting is enabled.
|
||||
# Note that updating the m.direct event is not atomic (except with mautrix-asmux)
|
||||
# and is therefore prone to race conditions.
|
||||
sync_direct_chat_list: false
|
||||
# Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
|
||||
# This field will automatically be changed back to false after it, except if the config file is not writable.
|
||||
resend_bridge_info: false
|
||||
# Should incoming custom emoji reactions be bridged as mxc:// URIs?
|
||||
# If set to false, custom emoji reactions will be bridged as the shortcode instead, and the image won't be available.
|
||||
custom_emoji_reactions: true
|
||||
# Should the bridge attempt to completely delete portal rooms when a channel is deleted on Discord?
|
||||
# If true, the bridge will try to kick Matrix users from the room. Otherwise, the bridge only makes ghosts leave.
|
||||
delete_portal_on_channel_delete: false
|
||||
# Should the bridge delete all portal rooms when you leave a guild on Discord?
|
||||
# This only applies if the guild has no other Matrix users on this bridge instance.
|
||||
delete_guild_on_leave: true
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
# If false, created portal rooms will never be federated.
|
||||
federate_rooms: true
|
||||
# Prefix messages from webhooks with the profile info? This can be used along with a custom displayname_template
|
||||
# to better handle webhooks that change their name all the time (like ones used by bridges).
|
||||
#
|
||||
# This will use the fallback mode in MSC4144, which means clients that support MSC4144 will not show the prefix
|
||||
# (and will instead show the name and avatar as the message sender).
|
||||
prefix_webhook_messages: true
|
||||
# Bridge webhook avatars?
|
||||
enable_webhook_avatars: false
|
||||
# Should the bridge upload media to the Discord CDN directly before sending the message when using a user token,
|
||||
# like the official client does? The other option is sending the media in the message send request as a form part
|
||||
# (which is always used by bots and webhooks).
|
||||
use_discord_cdn_upload: true
|
||||
# Should the bridge forbid direct messages from users to other users who they aren't friends with? Discord generally
|
||||
# considers this to be a "risky" action. Note that the bridge will conservatively reject all outgoing DMs from users
|
||||
# until it has synced that user's relationships from Discord.
|
||||
forbid_dming_strangers: true
|
||||
# Proxy for Discord connections
|
||||
proxy:
|
||||
# Should mxc uris copied from Discord be cached?
|
||||
# This can be `never` to never cache, `unencrypted` to only cache unencrypted mxc uris, or `always` to cache everything.
|
||||
# If you have a media repo that generates non-unique mxc uris, you should set this to never.
|
||||
cache_media: unencrypted
|
||||
# Settings for converting Discord media to custom mxc:// URIs instead of reuploading.
|
||||
# More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
|
||||
direct_media:
|
||||
# Should custom mxc:// URIs be used instead of reuploading media?
|
||||
enabled: false
|
||||
# The server name to use for the custom mxc:// URIs.
|
||||
# This server name will effectively be a real Matrix server, it just won't implement anything other than media.
|
||||
# You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge.
|
||||
server_name: discord-media.example.com
|
||||
# Optionally a custom .well-known response. This defaults to `server_name:443`
|
||||
well_known_response:
|
||||
# The bridge supports MSC3860 media download redirects and will use them if the requester supports it.
|
||||
# Optionally, you can force redirects and not allow proxying at all by setting this to false.
|
||||
allow_proxy: true
|
||||
# Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
|
||||
# This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
|
||||
server_key: generate
|
||||
# Settings for converting animated stickers.
|
||||
animated_sticker:
|
||||
# Format to which animated stickers should be converted.
|
||||
# disable - No conversion, send as-is (lottie JSON)
|
||||
# png - converts to non-animated png (fastest)
|
||||
# gif - converts to animated gif
|
||||
# webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
|
||||
# webp - converts to animated webp, requires ffmpeg executable with webp codec/container support
|
||||
target: webp
|
||||
# Arguments for converter. All converters take width and height.
|
||||
args:
|
||||
width: 320
|
||||
height: 320
|
||||
fps: 25 # only for webm, webp and gif (2, 5, 10, 20 or 25 recommended)
|
||||
# Servers to always allow double puppeting from
|
||||
double_puppet_server_map:
|
||||
example.com: https://example.com
|
||||
# Allow using double puppeting from any server with a valid client .well-known file.
|
||||
double_puppet_allow_discovery: false
|
||||
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
|
||||
#
|
||||
# If set, double puppeting will be enabled automatically for local users
|
||||
# instead of users having to find an access token and run `login-matrix`
|
||||
# manually.
|
||||
login_shared_secret_map:
|
||||
example.com: foobar
|
||||
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: '!discord'
|
||||
# Messages sent upon joining a management room.
|
||||
# Markdown is supported. The defaults are listed below.
|
||||
management_room_text:
|
||||
# Sent when joining a room.
|
||||
welcome: "Hello, I'm a Discord bridge bot."
|
||||
# Sent when joining a management room and the user is already logged in.
|
||||
welcome_connected: "Use `help` for help."
|
||||
# Sent when joining a management room and the user is not logged in.
|
||||
welcome_unconnected: "Use `help` for help or `login` to log in."
|
||||
# Optional extra text sent when joining a management room.
|
||||
additional_help: ""
|
||||
|
||||
# Settings for backfilling messages.
|
||||
backfill:
|
||||
# Limits for forward backfilling.
|
||||
forward_limits:
|
||||
# Initial backfill (when creating portal). 0 means backfill is disabled.
|
||||
# A special unlimited value is not supported, you must set a limit. Initial backfill will
|
||||
# fetch all messages first before backfilling anything, so high limits can take a lot of time.
|
||||
initial:
|
||||
dm: 0
|
||||
channel: 0
|
||||
thread: 0
|
||||
# Missed message backfill (on startup).
|
||||
# 0 means backfill is disabled, -1 means fetch all messages since last bridged message.
|
||||
# When using unlimited backfill (-1), messages are backfilled as they are fetched.
|
||||
# With limits, all messages up to the limit are fetched first and backfilled afterwards.
|
||||
missed:
|
||||
dm: 0
|
||||
channel: -1
|
||||
thread: 0
|
||||
# Maximum members in a guild to enable backfilling. Set to -1 to disable limit.
|
||||
# This can be used as a rough heuristic to disable backfilling in channels that are too active.
|
||||
# Currently only applies to missed message backfill.
|
||||
max_guild_members: -1
|
||||
|
||||
# End-to-bridge encryption support options.
|
||||
#
|
||||
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
||||
encryption:
|
||||
# Allow encryption, work in group chat rooms with e2ee enabled
|
||||
allow: true
|
||||
# Default to encryption, force-enable encryption in all portals the bridge creates
|
||||
# This will cause the bridge bot to be in private chats for the encryption to work properly.
|
||||
default: false
|
||||
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
|
||||
# Changing this option requires updating the appservice registration file.
|
||||
appservice: false
|
||||
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
|
||||
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
|
||||
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
|
||||
# Changing this option requires updating the appservice registration file.
|
||||
msc4190: false
|
||||
# Require encryption, drop any unencrypted messages.
|
||||
require: false
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow_key_sharing: false
|
||||
# Should users mentions be in the event wire content to enable the server to send push notifications?
|
||||
plaintext_mentions: false
|
||||
# Options for deleting megolm sessions from the bridge.
|
||||
delete_keys:
|
||||
# Beeper-specific: delete outbound sessions when hungryserv confirms
|
||||
# that the user has uploaded the key to key backup.
|
||||
delete_outbound_on_ack: false
|
||||
# Don't store outbound sessions in the inbound table.
|
||||
dont_store_outbound: false
|
||||
# Ratchet megolm sessions forward after decrypting messages.
|
||||
ratchet_on_decrypt: false
|
||||
# Delete fully used keys (index >= max_messages) after decrypting messages.
|
||||
delete_fully_used_on_decrypt: false
|
||||
# Delete previous megolm sessions from same device when receiving a new one.
|
||||
delete_prev_on_new_session: false
|
||||
# Delete megolm sessions received from a device when the device is deleted.
|
||||
delete_on_device_delete: false
|
||||
# Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
|
||||
periodically_delete_expired: false
|
||||
# Delete inbound megolm sessions that don't have the received_at field used for
|
||||
# automatic ratcheting and expired session deletion. This is meant as a migration
|
||||
# to delete old keys prior to the bridge update.
|
||||
delete_outdated_inbound: false
|
||||
# What level of device verification should be required from users?
|
||||
#
|
||||
# Valid levels:
|
||||
# unverified - Send keys to all device in the room.
|
||||
# cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
|
||||
# cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
|
||||
# cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
|
||||
# Note that creating user signatures from the bridge bot is not currently possible.
|
||||
# verified - Require manual per-device verification
|
||||
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
|
||||
verification_levels:
|
||||
# Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
|
||||
receive: unverified
|
||||
# Minimum level that the bridge should accept for incoming Matrix messages.
|
||||
send: unverified
|
||||
# Minimum level that the bridge should require for accepting key requests.
|
||||
share: cross-signed-tofu
|
||||
# Options for Megolm room key rotation. These options allow you to
|
||||
# configure the m.room.encryption event content. See:
|
||||
# https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
|
||||
# more information about that event.
|
||||
rotation:
|
||||
# Enable custom Megolm room key rotation settings. Note that these
|
||||
# settings will only apply to rooms created after this option is
|
||||
# set.
|
||||
enable_custom: false
|
||||
# The maximum number of milliseconds a session should be used
|
||||
# before changing it. The Matrix spec recommends 604800000 (a week)
|
||||
# as the default.
|
||||
milliseconds: 604800000
|
||||
# The maximum number of messages that should be sent with a given a
|
||||
# session before changing it. The Matrix spec recommends 100 as the
|
||||
# default.
|
||||
messages: 100
|
||||
|
||||
# Disable rotating keys when a user's devices change?
|
||||
# You should not enable this option unless you understand all the implications.
|
||||
disable_device_change_key_rotation: false
|
||||
|
||||
# Settings for provisioning API
|
||||
provisioning:
|
||||
# Prefix for the provisioning API paths.
|
||||
prefix: /_matrix/provision
|
||||
# Shared secret for authentication. If set to "generate", a random secret will be generated,
|
||||
# or if set to "disable", the provisioning API will be disabled.
|
||||
shared_secret: generate
|
||||
# Enable debug API at /debug with provisioning authentication.
|
||||
debug_endpoints: false
|
||||
|
||||
# Permissions for using the bridge.
|
||||
# Permitted values:
|
||||
# relay - Talk through the relaybot (if enabled), no access otherwise
|
||||
# user - Access to use the bridge to chat with a Discord account.
|
||||
# admin - User level and some additional administration tools
|
||||
# Permitted keys:
|
||||
# * - All Matrix users
|
||||
# domain - All users on that homeserver
|
||||
# mxid - Specific user
|
||||
permissions:
|
||||
"*": relay
|
||||
"matrix.lotusguild.org": user
|
||||
"@jared:matrix.lotusguild.org": admin
|
||||
|
||||
# Logging config. See https://github.com/tulir/zeroconfig for details.
|
||||
logging:
|
||||
min_level: info
|
||||
writers:
|
||||
- type: stdout
|
||||
format: pretty-colored
|
||||
- type: file
|
||||
format: json
|
||||
filename: /var/log/mautrix-discord/mautrix-discord.log
|
||||
max_size: 100
|
||||
max_backups: 10
|
||||
compress: true
|
||||
Executable
+103
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
# One-time install of the mautrix-discord bridge.
|
||||
# Run on the Proxmox node that hosts LXC 109 (PostgreSQL) and LXC 151 (Synapse):
|
||||
# pct exec 151 -- cat /opt/matrix-config/discord-bridge/install.sh | bash
|
||||
# Needs this repo's main branch already pulled to /opt/matrix-config on LXC 151
|
||||
# (the auto-deploy does that). Restarts Synapse once (~30-60s of downtime).
|
||||
# Safe to re-run: existing database, user, config and registration are kept.
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="v0.7.7"
|
||||
SHA256="1f3b6953b4eae00d141ce706f6e97c1b5d0e50268a447bc605df2fa4f44c5d9d"
|
||||
PG_CT=109
|
||||
SYNAPSE_CT=151
|
||||
SYNAPSE_IP="10.10.10.29"
|
||||
|
||||
# Only used if the database role does not exist yet; never printed.
|
||||
DB_PASSWORD="$(openssl rand -hex 24 </dev/null)"
|
||||
|
||||
echo "== [1/3] PostgreSQL (LXC $PG_CT): role, database, pg_hba =="
|
||||
pct exec "$PG_CT" -- bash -s "$DB_PASSWORD" "$SYNAPSE_IP" <<'PG'
|
||||
set -euo pipefail
|
||||
PW="$1"; SRC="$2"
|
||||
HBA=/etc/postgresql/17/main/pg_hba.conf
|
||||
if su postgres -c "psql -Atc \"select 1 from pg_roles where rolname='mautrix_discord'\"" | grep -q 1; then
|
||||
echo "role mautrix_discord exists, keeping it"
|
||||
echo "EXISTS" > /root/.mautrix-discord-role-existed
|
||||
else
|
||||
su postgres -c "psql -v ON_ERROR_STOP=1 -q" <<SQL
|
||||
CREATE ROLE mautrix_discord LOGIN PASSWORD '$PW';
|
||||
SQL
|
||||
rm -f /root/.mautrix-discord-role-existed
|
||||
fi
|
||||
if ! su postgres -c "psql -Atc \"select 1 from pg_database where datname='mautrix_discord'\"" | grep -q 1; then
|
||||
su postgres -c "psql -v ON_ERROR_STOP=1 -q -c \"CREATE DATABASE mautrix_discord OWNER mautrix_discord ENCODING 'UTF8' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0\""
|
||||
fi
|
||||
if ! grep -q '^host *mautrix_discord ' "$HBA"; then
|
||||
cp "$HBA" "$HBA.bak-$(date +%Y%m%d%H%M%S)-discord"
|
||||
sed -i "/^host *synapse *synapse_user/a host mautrix_discord mautrix_discord $SRC/32 scram-sha-256" "$HBA"
|
||||
fi
|
||||
su postgres -c "psql -Atqc 'select pg_reload_conf()'" >/dev/null
|
||||
echo "ok"
|
||||
PG
|
||||
|
||||
ROLE_EXISTED=$(pct exec "$PG_CT" -- sh -c 'test -f /root/.mautrix-discord-role-existed && echo yes || echo no' </dev/null)
|
||||
|
||||
echo "== [2/3] Bridge (LXC $SYNAPSE_CT): binary, config, registration, service =="
|
||||
pct exec "$SYNAPSE_CT" -- bash -s "$DB_PASSWORD" "$ROLE_EXISTED" "$VERSION" "$SHA256" <<'BR'
|
||||
set -euo pipefail
|
||||
PW="$1"; ROLE_EXISTED="$2"; VERSION="$3"; SHA256="$4"
|
||||
DIR=/opt/mautrix-discord
|
||||
SRC=/opt/matrix-config
|
||||
id mautrix-discord >/dev/null 2>&1 || useradd --system --home "$DIR" --shell /usr/sbin/nologin mautrix-discord
|
||||
mkdir -p "$DIR" /var/log/mautrix-discord
|
||||
|
||||
curl -fsSL -o "$DIR/mautrix-discord.new" "https://github.com/mautrix/discord/releases/download/$VERSION/mautrix-discord-amd64"
|
||||
echo "$SHA256 $DIR/mautrix-discord.new" | sha256sum -c -
|
||||
chmod 755 "$DIR/mautrix-discord.new"
|
||||
mv "$DIR/mautrix-discord.new" "$DIR/mautrix-discord"
|
||||
|
||||
if [ ! -f "$DIR/config.yaml" ]; then
|
||||
if [ "$ROLE_EXISTED" = yes ]; then
|
||||
echo "ERROR: DB role already existed but there is no config; set the password in $DIR/config.yaml by hand" >&2
|
||||
exit 1
|
||||
fi
|
||||
sed "s/DB_PASSWORD/$PW/" "$SRC/discord-bridge/config.yaml" > "$DIR/config.yaml"
|
||||
fi
|
||||
if [ ! -f "$DIR/registration.yaml" ]; then
|
||||
(cd "$DIR" && ./mautrix-discord -g -c config.yaml -r registration.yaml)
|
||||
fi
|
||||
chown -R mautrix-discord:mautrix-discord "$DIR" /var/log/mautrix-discord
|
||||
chmod 600 "$DIR/config.yaml"
|
||||
install -m 640 -o root -g matrix-synapse "$DIR/registration.yaml" /etc/matrix-synapse/discord-registration.yaml
|
||||
|
||||
install -m 644 "$SRC/systemd/mautrix-discord.service" /etc/systemd/system/mautrix-discord.service
|
||||
systemctl daemon-reload
|
||||
|
||||
HS=/etc/matrix-synapse/homeserver.yaml
|
||||
if ! grep -q discord-registration.yaml "$HS"; then
|
||||
cp "$HS" "$HS.bak-$(date +%Y%m%d%H%M%S)-discord"
|
||||
sed -i '/^ - \/etc\/matrix-synapse\/hookshot-registration.yaml/a \ - /etc/matrix-synapse/discord-registration.yaml' "$HS"
|
||||
fi
|
||||
grep -A3 '^app_service_config_files' "$HS"
|
||||
echo "ok"
|
||||
BR
|
||||
|
||||
echo "== [3/3] Restart Synapse, start bridge =="
|
||||
pct exec "$SYNAPSE_CT" -- bash -s <<'RS'
|
||||
set -euo pipefail
|
||||
systemctl restart matrix-synapse
|
||||
for i in $(seq 1 60); do
|
||||
curl -fsS -o /dev/null http://127.0.0.1:8008/health && break
|
||||
sleep 2
|
||||
done
|
||||
curl -fsS http://127.0.0.1:8008/health && echo " (synapse healthy)"
|
||||
systemctl enable --now mautrix-discord
|
||||
sleep 5
|
||||
systemctl --no-pager --lines=15 status mautrix-discord
|
||||
RS
|
||||
|
||||
pct exec "$PG_CT" -- rm -f /root/.mautrix-discord-role-existed </dev/null
|
||||
echo
|
||||
echo "Done. In Lotus Chat, start a DM with @discordbot:matrix.lotusguild.org and send:"
|
||||
echo " login-token bot <your new bot token>"
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Gives @discordbot the Discord logo and the display name "Discord Bridge".
|
||||
# Run inside LXC 151 (from the Proxmox node):
|
||||
# pct exec 151 -- bash /opt/matrix-config/discord-bridge/set-bot-profile.sh
|
||||
# Uploads bot-avatar.png as the bridge bot, points config.yaml at it and
|
||||
# restarts the bridge, which applies the profile on startup. Safe to re-run.
|
||||
set -euo pipefail
|
||||
|
||||
DIR=/opt/mautrix-discord
|
||||
CFG="$DIR/config.yaml"
|
||||
AVATAR=/opt/matrix-config/discord-bridge/bot-avatar.png
|
||||
BOT="@discordbot:matrix.lotusguild.org"
|
||||
|
||||
AS_TOKEN=$(awk '/^as_token:/ {gsub(/"/, "", $2); print $2; exit}' "$DIR/registration.yaml")
|
||||
[ -n "$AS_TOKEN" ] || { echo "no as_token in $DIR/registration.yaml" >&2; exit 1; }
|
||||
|
||||
MXC=$(curl -fsS -X POST \
|
||||
-H "Authorization: Bearer $AS_TOKEN" \
|
||||
-H "Content-Type: image/png" \
|
||||
--data-binary "@$AVATAR" \
|
||||
"http://127.0.0.1:8008/_matrix/media/v3/upload?filename=discord.png&user_id=${BOT/@/%40}" |
|
||||
python3 -c 'import json, sys; print(json.load(sys.stdin)["content_uri"])')
|
||||
echo "uploaded $MXC"
|
||||
|
||||
# Only the bot block's two lines; the 8-space indent is unique to appservice.bot.
|
||||
sed -i -E \
|
||||
-e 's|^( displayname: ).*$|\1Discord Bridge|' \
|
||||
-e "s|^( avatar: )mxc://.*$|\1$MXC|" \
|
||||
"$CFG"
|
||||
grep -A7 '^ bot:' "$CFG"
|
||||
|
||||
systemctl restart mautrix-discord
|
||||
sleep 3
|
||||
systemctl is-active mautrix-discord
|
||||
@@ -7,11 +7,7 @@ pantalaimon:
|
||||
username: draupnir
|
||||
password: ""
|
||||
|
||||
# The management room (and most Lotus rooms) are end-to-end encrypted. Without
|
||||
# crypto Draupnir can post there but can't read commands, so `!draupnir …` was
|
||||
# silently ignored (LotusGuild/cinny audit, 2026-10-13). Rust crypto stores its
|
||||
# keys under dataPath.
|
||||
experimentalRustCrypto: true
|
||||
experimentalRustCrypto: false
|
||||
|
||||
dataPath: "/data/storage"
|
||||
|
||||
|
||||
@@ -77,4 +77,13 @@ if (event === 'ticket_created') {
|
||||
html = '[tinker-tickets] event: <code>' + event + '</code> ticket #' + id;
|
||||
}
|
||||
|
||||
result = { version: 'v2', plain: plain, html: html, msgtype: 'm.text' };
|
||||
// Explicit mentions (m.mentions): from Synapse 1.164 the legacy push rules
|
||||
// that pinged on a user ID or display name in the body are off by default
|
||||
// (MSC4210), so the people to notify must be listed here.
|
||||
result = {
|
||||
version: 'v2',
|
||||
plain: plain,
|
||||
html: html,
|
||||
msgtype: 'm.text',
|
||||
mentions: { user_ids: notifyUsers }
|
||||
};
|
||||
+9
-1
@@ -23,6 +23,14 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def human_date(iso):
|
||||
"""2026-09-26 -> September 26, 2026 (the page avoids hyphens in visible text)."""
|
||||
from datetime import date
|
||||
|
||||
d = date.fromisoformat(iso)
|
||||
return f"{d:%B} {d.day}, {d.year}"
|
||||
INDEX = ROOT / "index.html"
|
||||
MARK = {"yes": "✓", "no": "✗", "part": "~"}
|
||||
|
||||
@@ -96,7 +104,7 @@ def main():
|
||||
new = replace_block(new, "features", render_features(features))
|
||||
new = replace_block(new, "comparison", render_comparison(comparison))
|
||||
new = replace_block(
|
||||
new, "reviewed", f'Client comparison last reviewed <time datetime="{comparison["reviewed"]}">{comparison["reviewed"]}</time>'
|
||||
new, "reviewed", f'Client comparison last reviewed <time datetime="{comparison["reviewed"]}">{human_date(comparison["reviewed"])}</time>'
|
||||
)
|
||||
if "--check" in sys.argv:
|
||||
if new != html:
|
||||
|
||||
@@ -190,18 +190,18 @@
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "Linux: click opens chat, Mark-as-read/Mute actions; no inline reply"
|
||||
"note": "Linux: click opens chat, Mark as read/Mute actions; no inline reply"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Windows & Linux: click-to-open, inline reply, call accept/decline"
|
||||
"note": "Windows & Linux: click to open, inline reply, call accept/decline"
|
||||
},
|
||||
{
|
||||
"mark": "part"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Linux inline reply (D-Bus), macOS quick reply, click-to-open"
|
||||
"note": "Linux inline reply (D-Bus), macOS quick reply, click to open"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -232,7 +232,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Taskbar + volume-flyout call controls",
|
||||
"feature": "Taskbar + volume flyout call controls",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -258,7 +258,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Focus Assist → auto Do-Not-Disturb",
|
||||
"feature": "Focus Assist → auto Do Not Disturb",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -311,7 +311,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Recursive folder drag-drop upload",
|
||||
"feature": "Recursive folder drag drop upload",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -404,7 +404,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "SAS emoji, cross-client requests show inline card"
|
||||
"note": "SAS emoji, cross client requests show inline card"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -501,27 +501,27 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "3 tiers: off / browser-native /<br>on-device ML (RNNoise, Speex,<br>DTLN, DeepFilterNet 3),<br>works on self-hosted SFU"
|
||||
"note": "3 tiers: off / browser native /<br>on device ML (RNNoise, Speex,<br>DTLN, DeepFilterNet 3),<br>works on self hosted SFU"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "browser-native<br>via Element Call"
|
||||
"note": "browser native<br>via Element Call"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "browser-native"
|
||||
"note": "browser native"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "WebRTC-native"
|
||||
"note": "WebRTC native"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "browser-native (WebRTC)"
|
||||
"note": "browser native (WebRTC)"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "browser-native (WebRTC noiseSuppression toggle)"
|
||||
"note": "browser native (WebRTC noiseSuppression toggle)"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -529,15 +529,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Push-to-Talk<small>hold key to transmit</small>",
|
||||
"feature": "Push to Talk<small>hold key to transmit</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "configurable hold key,<br>PTT badge in call bar;<br>M = push-to-deafen;<br>system-wide on Windows desktop"
|
||||
"note": "configurable hold key,<br>PTT badge in call bar;<br>M = push to deafen;<br>system wide on Windows desktop"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "hold Space while muted (Element Call built-in); no configurable key"
|
||||
"note": "hold Space while muted (Element Call built in); no configurable key"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -558,11 +558,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "AFK auto-mute<small>silence mic after idle timeout</small>",
|
||||
"feature": "AFK auto mute<small>silence mic after idle timeout</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "1–30 min timeout,<br>toast notification"
|
||||
"note": "1 to 30 min timeout,<br>toast notification"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -585,11 +585,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Voice channel user limit<small>admin-set max participants</small>",
|
||||
"feature": "Voice channel user limit<small>admin set max participants</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "per-room cap,<br>server-enforced<br>for all clients"
|
||||
"note": "per room cap,<br>server enforced<br>for all clients"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -678,7 +678,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "DMs & group chats;<br>ring tone, auto-dismiss"
|
||||
"note": "DMs & group chats;<br>ring tone, auto dismiss"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -715,11 +715,11 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "best-in-class sub-space nav"
|
||||
"note": "best in class subspace nav"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "best-in-class sub-space nav"
|
||||
"note": "best in class subspace nav"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -730,11 +730,11 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Discord-like categories"
|
||||
"note": "Discord like categories"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "sub-spaces clunky"
|
||||
"note": "subspaces clunky"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -747,7 +747,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "side panel + Slack-style per-thread notifications"
|
||||
"note": "side panel + Slack style per thread notifications"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -869,7 +869,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "best-in-class"
|
||||
"note": "best in class"
|
||||
},
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -898,7 +898,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Giphy, Terminal TDS themed,<br>click-outside to close"
|
||||
"note": "Giphy, Terminal TDS themed,<br>click outside to close"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -926,7 +926,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "local cache scan; load-more<br>buttons extend history per room"
|
||||
"note": "local cache scan; load more<br>buttons extend history per room"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -937,11 +937,11 @@
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "per-room; downloads & decrypts history client-side"
|
||||
"note": "per room; downloads & decrypts history client side"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "client-side; auto-fetches +<br>decrypts history during search"
|
||||
"note": "client side; auto fetches +<br>decrypts history during search"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -988,7 +988,7 @@
|
||||
"title": "UX & Extras",
|
||||
"rows": [
|
||||
{
|
||||
"feature": "Multi-account",
|
||||
"feature": "Multi account",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1001,7 +1001,7 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "account switcher; multi-account push since v2.6.0"
|
||||
"note": "account switcher; multi account push since v2.6.0"
|
||||
},
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -1046,11 +1046,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Discord-like UI",
|
||||
"feature": "Discord like UI",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "best-in-class for web"
|
||||
"note": "best in class for web"
|
||||
},
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -1064,7 +1064,7 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Discord-like layout"
|
||||
"note": "Discord like layout"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1106,7 +1106,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "5–80% intensity slider,<br>Settings → Appearance"
|
||||
"note": "5 to 80% intensity slider,<br>Settings → Appearance"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1129,7 +1129,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Animated chat backgrounds<small>CSS-only, GPU-accelerated</small>",
|
||||
"feature": "Animated chat backgrounds<small>CSS only, GPU accelerated</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1230,7 +1230,7 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Forward action; multi-room on Android"
|
||||
"note": "Forward action; multi room on Android"
|
||||
},
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -1247,7 +1247,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Per-message read receipts<small>who read each message</small>",
|
||||
"feature": "Per message read receipts<small>who read each message</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1281,7 +1281,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "hover tooltip with names;<br>right-click for full avatar modal"
|
||||
"note": "hover tooltip with names;<br>right click for full avatar modal"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1289,11 +1289,11 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "long-press reaction for summary sheet"
|
||||
"note": "long press reaction for summary sheet"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "long-press reaction"
|
||||
"note": "long press reaction"
|
||||
},
|
||||
{
|
||||
"mark": "yes"
|
||||
@@ -1342,7 +1342,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "emoji picker, auto-clear timer<br>(30 min – 7 days), 64-char limit"
|
||||
"note": "emoji picker, auto clear timer<br>(30 min to 7 days), 64 char limit"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1370,11 +1370,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Online presence tracking<small>idle/away auto-detection</small>",
|
||||
"feature": "Online presence tracking<small>idle/away auto detection</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "online on start, idle after 10 min,<br>unavailable when tab hidden,<br>offline on close; hide-status toggle"
|
||||
"note": "online on start, idle after 10 min,<br>unavailable when tab hidden,<br>offline on close; hide status toggle"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -1390,11 +1390,11 @@
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "sets 'unavailable' 15s after the app loses focus; no input-idle timer"
|
||||
"note": "sets 'unavailable' 15s after the app loses focus; no input idle timer"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "3-min idle → away; no hide toggle"
|
||||
"note": "3 min idle → away; no hide toggle"
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
@@ -1407,7 +1407,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "right-side drawer;<br>Images/Videos/Files tabs"
|
||||
"note": "right side drawer;<br>Images/Videos/Files tabs"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1524,11 +1524,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Custom notification sounds<small>per-category sound selector</small>",
|
||||
"feature": "Custom notification sounds<small>per category sound selector</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "per-category sound selector; ▶ preview"
|
||||
"note": "per category sound selector; ▶ preview"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1599,11 +1599,11 @@
|
||||
},
|
||||
{
|
||||
"mark": "part",
|
||||
"note": "manual drag-reorder; no sort selector"
|
||||
"note": "manual drag reorder; no sort selector"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "Activity, A-Z or Unread-first"
|
||||
"note": "Activity, A to Z or Unread first"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1645,7 +1645,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "txt/json/html, date range,<br>E2EE-aware"
|
||||
"note": "txt/json/html, date range,<br>E2EE aware"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1700,7 +1700,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "right-click bookmark,<br>sidebar panel, syncs across devices"
|
||||
"note": "right click bookmark,<br>sidebar panel, syncs across devices"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1723,7 +1723,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Collapsible long messages<small>auto-collapse >20 lines</small>",
|
||||
"feature": "Collapsible long messages<small>auto collapse >20 lines</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1751,7 +1751,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Inline GIF preview<small>Giphy / Tenor links auto-embed</small>",
|
||||
"feature": "Inline GIF preview<small>Giphy / Tenor links auto embed</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1833,7 +1833,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "Quick emoji reactions on hover<small>1-click react, no menu needed</small>",
|
||||
"feature": "Quick emoji reactions on hover<small>one click react, no menu needed</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
@@ -1850,23 +1850,23 @@
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "hover bar shows up to 4 recent reactions, 1-click"
|
||||
"note": "hover bar shows up to 4 recent reactions, one click"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
},
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "hover bar shows recent reactions, 1-click"
|
||||
"note": "hover bar shows recent reactions, one click"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "In-app notification toasts<small>TDS-styled, when window focused</small>",
|
||||
"feature": "In app notification toasts<small>TDS styled, when window focused</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "slides in bottom-right;<br>4 s auto-dismiss, click to jump"
|
||||
"note": "slides in bottom right;<br>4 s auto dismiss, click to jump"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
@@ -1889,11 +1889,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"feature": "On-device message translation<small>read foreign messages in your language</small>",
|
||||
"feature": "On device message translation<small>read foreign messages in your language</small>",
|
||||
"cells": [
|
||||
{
|
||||
"mark": "yes",
|
||||
"note": "100% on-device browser AI;<br>works in E2EE rooms, no cloud;<br>Chromium desktop & Lotus app"
|
||||
"note": "100% on device browser AI;<br>works in E2EE rooms, no cloud;<br>Chromium desktop & Lotus app"
|
||||
},
|
||||
{
|
||||
"mark": "no"
|
||||
|
||||
+23
-23
@@ -2,56 +2,56 @@
|
||||
{
|
||||
"title": "Calls & Voice",
|
||||
"items": [
|
||||
"Voice rooms with our own Element Call fork on a self-hosted LiveKit SFU",
|
||||
"Push-to-talk and push-to-deafen, with system-wide hotkeys on the Windows app (work while a game has focus)",
|
||||
"Mic level meter on the mute button; per-person call volume that's remembered between calls",
|
||||
"On-device noise suppression: Off, browser-native, or ML (RNNoise, Speex, DTLN, DeepFilterNet 3)",
|
||||
"In-call soundboard with your own clips, synced across your devices",
|
||||
"Incoming-call ring with Answer/Decline, join/leave sounds, draggable picture-in-picture window",
|
||||
"Screenshare fullscreen and audio mute; per-user mic/screenshare bitrate and framerate caps",
|
||||
"Server-enforced room limits and permissions (max participants, audio-only, no screenshare) for every Matrix client",
|
||||
"AFK auto-mute after a configurable idle time"
|
||||
"Voice rooms with our own Element Call fork on a self hosted LiveKit SFU",
|
||||
"Push to talk and push to deafen, with system wide hotkeys on the Windows app (work while a game has focus)",
|
||||
"Mic level meter on the mute button; per person call volume that's remembered between calls",
|
||||
"On device noise suppression: Off, browser native, or ML (RNNoise, Speex, DTLN, DeepFilterNet 3)",
|
||||
"In call soundboard with your own clips, synced across your devices",
|
||||
"Incoming call ring with Answer/Decline, join/leave sounds, draggable picture in picture window",
|
||||
"Screenshare fullscreen and audio mute; per user mic/screenshare bitrate and framerate caps",
|
||||
"Server enforced room limits and permissions (max participants, audio only, no screenshare) for every Matrix client",
|
||||
"AFK auto mute after a configurable idle time"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Messaging",
|
||||
"items": [
|
||||
"Threads with a side panel, unread chips, “Mark all read” and per-thread notification overrides",
|
||||
"Threads with a side panel, unread chips, “Mark all read” and per thread notification overrides",
|
||||
"Search operators: <code>from:</code>, <code>in:</code>, <code>before:</code>/<code>after:</code> (dates or <code>7d</code>), <code>has:link|image|video|file</code>, <code>is:pinned</code>",
|
||||
"Voice messages with 0.75×–2× playback (MSC3245, E2EE)",
|
||||
"Voice messages with 0.75× to 2× playback (MSC3245, E2EE)",
|
||||
"Polls, message scheduling (MSC4140), forwarding, captions and location sharing",
|
||||
"Pinned messages, saved messages/bookmarks and private notes on people, synced across devices",
|
||||
"Who-reacted viewer, read receipt avatars, quick reactions on hover",
|
||||
"Who reacted viewer, read receipt avatars, quick reactions on hover",
|
||||
"GIF picker (Giphy), custom emoji & sticker packs, math/LaTeX (KaTeX)",
|
||||
"Pasted code is offered as a formatted code block, with the language detected",
|
||||
"On-device message translation: text never leaves your machine, works in encrypted rooms"
|
||||
"On device message translation: text never leaves your machine, works in encrypted rooms"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Media & Links",
|
||||
"items": [
|
||||
"Click-to-play inline embeds: YouTube, Vimeo, Twitch, TikTok, X, Instagram, Reddit, Bluesky, Spotify, SoundCloud, Apple Music, Tidal and more",
|
||||
"Click to play inline embeds: YouTube, Vimeo, Twitch, TikTok, X, Instagram, Reddit, Bluesky, Spotify, SoundCloud, Apple Music, Tidal and more",
|
||||
"Rich link cards for GitHub, Steam, Wikipedia, IMDb, npm and others; animated GIF previews",
|
||||
"Full-screen viewer with pinch-zoom, swipe/arrow-key navigation and captions; media gallery for every file shared in a room",
|
||||
"Optional image compression, folder drag-and-drop upload"
|
||||
"Full screen viewer with pinch zoom, swipe/arrow key navigation and captions; media gallery for every file shared in a room",
|
||||
"Optional image compression, folder drag and drop upload"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Privacy & Security",
|
||||
"items": [
|
||||
"Private read receipts, hide typing, hide online status",
|
||||
"Tracking-parameter stripping (utm_*, fbclid, YouTube si= and ~40 more), on your device",
|
||||
"Opt-in on-device search index for encrypted rooms, wiped on logout",
|
||||
"Device verification fixes (cross-client emoji SAS) and a per-member session panel"
|
||||
"Tracking parameter stripping (utm_*, fbclid, YouTube si= and ~40 more), on your device",
|
||||
"Opt in on device search index for encrypted rooms, wiped on logout",
|
||||
"Device verification fixes (cross client emoji SAS) and a per member session panel"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Look & Feel",
|
||||
"items": [
|
||||
"Lotus Terminal theme, night-light filter, glassmorphism sidebar",
|
||||
"Lotus Terminal theme, night light filter, glassmorphism sidebar",
|
||||
"Animated chat backgrounds and 11 seasonal overlays (all respect reduced motion)",
|
||||
"629 animated avatar decorations in 28 categories, visible to other Lotus users (MSC4133)",
|
||||
"Custom status with emoji and auto-clear, Discord-style presence rings",
|
||||
"Custom status with emoji and auto clear, Discord style presence rings",
|
||||
"Settings sync across devices (theme, layout, notification and privacy preferences)"
|
||||
]
|
||||
},
|
||||
@@ -67,9 +67,9 @@
|
||||
{
|
||||
"title": "Rooms & Moderation",
|
||||
"items": [
|
||||
"Knock-to-join with an admin approve/deny panel and live pending-count badge",
|
||||
"Knock to join with an admin approve/deny panel and live pending count badge",
|
||||
"Invite links with QR codes, favourites, room filter, room history export (txt/json/html)",
|
||||
"Room activity & mod log, stats panel, server ACL editor, policy-list viewer",
|
||||
"Room activity & mod log, stats panel, server ACL editor, policy list viewer",
|
||||
"Room widgets, with a permission prompt before a widget may read or send in the room"
|
||||
]
|
||||
}
|
||||
|
||||
+108
-108
@@ -426,12 +426,12 @@
|
||||
background: #111;
|
||||
}
|
||||
tr.section-header td {
|
||||
/* section headers span full width — override sticky bg */
|
||||
/* section headers span full width: override sticky bg */
|
||||
position: static;
|
||||
background: rgba(152,0,0,0.06);
|
||||
}
|
||||
|
||||
/* Scroll hint — visible only on mobile via JS class */
|
||||
/* Scroll hint: visible only on mobile via JS class */
|
||||
.scroll-hint {
|
||||
display: none;
|
||||
font-size: 0.72rem;
|
||||
@@ -543,11 +543,11 @@
|
||||
<ol class="steps">
|
||||
<li>
|
||||
<span class="step-num">1</span>
|
||||
<span class="step-text">Open <a href="https://chat.lotusguild.org" target="_blank" rel="noopener">chat.lotusguild.org</a> — your homeserver is pre-configured</span>
|
||||
<span class="step-text">Ask <code class="homeserver">@jared:matrix.lotusguild.org</code> for a Lotus Guild account</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="step-num">2</span>
|
||||
<span class="step-text">Register with a <strong>token from Jared</strong> — <code class="homeserver">@jared:matrix.lotusguild.org</code></span>
|
||||
<span class="step-text">Open <a href="https://chat.lotusguild.org" target="_blank" rel="noopener">chat.lotusguild.org</a> and sign in with <strong>Lotus SSO</strong></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="step-num">3</span>
|
||||
@@ -569,14 +569,14 @@
|
||||
<div class="client-featured">
|
||||
<a href="https://chat.lotusguild.org" target="_blank" rel="noopener">
|
||||
<span class="client-name">Lotus Guild Chat</span>
|
||||
<span class="client-desc">Hosted Cinny — homeserver pre-configured, no setup</span>
|
||||
<span class="client-desc">Hosted Cinny with the homeserver already set up</span>
|
||||
<span class="tag-row">
|
||||
<span class="tag dim">Windows</span>
|
||||
<span class="tag dim">Linux</span>
|
||||
<span class="tag dim">Web</span>
|
||||
<span class="tag dev">Lotus Fork</span>
|
||||
<span class="tag voice">Voice, Video & Screenshare</span>
|
||||
<span class="tag">Discord-like UI</span>
|
||||
<span class="tag">Discord like UI</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@@ -586,56 +586,56 @@
|
||||
<div class="fork-group">
|
||||
<h4>Calls & Voice</h4>
|
||||
<ul>
|
||||
<li>Voice rooms with our own Element Call fork on a self-hosted LiveKit SFU</li>
|
||||
<li>Push-to-talk and push-to-deafen, with system-wide hotkeys on the Windows app (work while a game has focus)</li>
|
||||
<li>Mic level meter on the mute button; per-person call volume that's remembered between calls</li>
|
||||
<li>On-device noise suppression: Off, browser-native, or ML (RNNoise, Speex, DTLN, DeepFilterNet 3)</li>
|
||||
<li>In-call soundboard with your own clips, synced across your devices</li>
|
||||
<li>Incoming-call ring with Answer/Decline, join/leave sounds, draggable picture-in-picture window</li>
|
||||
<li>Screenshare fullscreen and audio mute; per-user mic/screenshare bitrate and framerate caps</li>
|
||||
<li>Server-enforced room limits and permissions (max participants, audio-only, no screenshare) for every Matrix client</li>
|
||||
<li>AFK auto-mute after a configurable idle time</li>
|
||||
<li>Voice rooms with our own Element Call fork on a self hosted LiveKit SFU</li>
|
||||
<li>Push to talk and push to deafen, with system wide hotkeys on the Windows app (work while a game has focus)</li>
|
||||
<li>Mic level meter on the mute button; per person call volume that's remembered between calls</li>
|
||||
<li>On device noise suppression: Off, browser native, or ML (RNNoise, Speex, DTLN, DeepFilterNet 3)</li>
|
||||
<li>In call soundboard with your own clips, synced across your devices</li>
|
||||
<li>Incoming call ring with Answer/Decline, join/leave sounds, draggable picture in picture window</li>
|
||||
<li>Screenshare fullscreen and audio mute; per user mic/screenshare bitrate and framerate caps</li>
|
||||
<li>Server enforced room limits and permissions (max participants, audio only, no screenshare) for every Matrix client</li>
|
||||
<li>AFK auto mute after a configurable idle time</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fork-group">
|
||||
<h4>Messaging</h4>
|
||||
<ul>
|
||||
<li>Threads with a side panel, unread chips, “Mark all read” and per-thread notification overrides</li>
|
||||
<li>Threads with a side panel, unread chips, “Mark all read” and per thread notification overrides</li>
|
||||
<li>Search operators: <code>from:</code>, <code>in:</code>, <code>before:</code>/<code>after:</code> (dates or <code>7d</code>), <code>has:link|image|video|file</code>, <code>is:pinned</code></li>
|
||||
<li>Voice messages with 0.75×–2× playback (MSC3245, E2EE)</li>
|
||||
<li>Voice messages with 0.75× to 2× playback (MSC3245, E2EE)</li>
|
||||
<li>Polls, message scheduling (MSC4140), forwarding, captions and location sharing</li>
|
||||
<li>Pinned messages, saved messages/bookmarks and private notes on people, synced across devices</li>
|
||||
<li>Who-reacted viewer, read receipt avatars, quick reactions on hover</li>
|
||||
<li>Who reacted viewer, read receipt avatars, quick reactions on hover</li>
|
||||
<li>GIF picker (Giphy), custom emoji & sticker packs, math/LaTeX (KaTeX)</li>
|
||||
<li>Pasted code is offered as a formatted code block, with the language detected</li>
|
||||
<li>On-device message translation: text never leaves your machine, works in encrypted rooms</li>
|
||||
<li>On device message translation: text never leaves your machine, works in encrypted rooms</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fork-group">
|
||||
<h4>Media & Links</h4>
|
||||
<ul>
|
||||
<li>Click-to-play inline embeds: YouTube, Vimeo, Twitch, TikTok, X, Instagram, Reddit, Bluesky, Spotify, SoundCloud, Apple Music, Tidal and more</li>
|
||||
<li>Click to play inline embeds: YouTube, Vimeo, Twitch, TikTok, X, Instagram, Reddit, Bluesky, Spotify, SoundCloud, Apple Music, Tidal and more</li>
|
||||
<li>Rich link cards for GitHub, Steam, Wikipedia, IMDb, npm and others; animated GIF previews</li>
|
||||
<li>Full-screen viewer with pinch-zoom, swipe/arrow-key navigation and captions; media gallery for every file shared in a room</li>
|
||||
<li>Optional image compression, folder drag-and-drop upload</li>
|
||||
<li>Full screen viewer with pinch zoom, swipe/arrow key navigation and captions; media gallery for every file shared in a room</li>
|
||||
<li>Optional image compression, folder drag and drop upload</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fork-group">
|
||||
<h4>Privacy & Security</h4>
|
||||
<ul>
|
||||
<li>Private read receipts, hide typing, hide online status</li>
|
||||
<li>Tracking-parameter stripping (utm_*, fbclid, YouTube si= and ~40 more), on your device</li>
|
||||
<li>Opt-in on-device search index for encrypted rooms, wiped on logout</li>
|
||||
<li>Device verification fixes (cross-client emoji SAS) and a per-member session panel</li>
|
||||
<li>Tracking parameter stripping (utm_*, fbclid, YouTube si= and ~40 more), on your device</li>
|
||||
<li>Opt in on device search index for encrypted rooms, wiped on logout</li>
|
||||
<li>Device verification fixes (cross client emoji SAS) and a per member session panel</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fork-group">
|
||||
<h4>Look & Feel</h4>
|
||||
<ul>
|
||||
<li>Lotus Terminal theme, night-light filter, glassmorphism sidebar</li>
|
||||
<li>Lotus Terminal theme, night light filter, glassmorphism sidebar</li>
|
||||
<li>Animated chat backgrounds and 11 seasonal overlays (all respect reduced motion)</li>
|
||||
<li>629 animated avatar decorations in 28 categories, visible to other Lotus users (MSC4133)</li>
|
||||
<li>Custom status with emoji and auto-clear, Discord-style presence rings</li>
|
||||
<li>Custom status with emoji and auto clear, Discord style presence rings</li>
|
||||
<li>Settings sync across devices (theme, layout, notification and privacy preferences)</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -651,16 +651,16 @@
|
||||
<div class="fork-group">
|
||||
<h4>Rooms & Moderation</h4>
|
||||
<ul>
|
||||
<li>Knock-to-join with an admin approve/deny panel and live pending-count badge</li>
|
||||
<li>Knock to join with an admin approve/deny panel and live pending count badge</li>
|
||||
<li>Invite links with QR codes, favourites, room filter, room history export (txt/json/html)</li>
|
||||
<li>Room activity & mod log, stats panel, server ACL editor, policy-list viewer</li>
|
||||
<li>Room activity & mod log, stats panel, server ACL editor, policy list viewer</li>
|
||||
<li>Room widgets, with a permission prompt before a widget may read or send in the room</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END:features -->
|
||||
<p class="fork-more">Full list in <a href="https://code.lotusguild.org/LotusGuild/cinny/src/branch/lotus/LOTUS_FEATURES.md" target="_blank" rel="noopener">LOTUS_FEATURES.md</a>.</p>
|
||||
<p class="also-available">Prefer the unmodified upstream? <a href="https://cinny.in" target="_blank" rel="noopener">cinny.in</a> works with our homeserver — set it to <code class="hs-inline">matrix.lotusguild.org</code>.</p>
|
||||
<p class="also-available">Prefer the unmodified upstream? <a href="https://cinny.in" target="_blank" rel="noopener">cinny.in</a> works with our homeserver: set it to <code class="hs-inline">matrix.lotusguild.org</code>.</p>
|
||||
|
||||
<div class="space-join">
|
||||
<p>Already signed in? Jump straight into the community:</p>
|
||||
@@ -674,7 +674,7 @@
|
||||
<h3>Other Clients</h3>
|
||||
|
||||
<div class="client-group">
|
||||
<p class="client-group-label">Web & Desktop — Official Cinny</p>
|
||||
<p class="client-group-label">Web & Desktop: Official Cinny</p>
|
||||
<div class="client-cards">
|
||||
<div class="client-card">
|
||||
<div class="client-card-top">
|
||||
@@ -687,13 +687,13 @@
|
||||
<span class="tag voice">Voice, Video & Screenshare</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="client-card-desc">The upstream open-source Cinny client, on the web and as a desktop app for Windows, macOS and Linux. It has the same Discord-like UI and space navigation as Lotus Chat, and now includes voice/video calls, voice rooms and screenshare through embedded Element Call, with ringing for DM calls. It lacks our custom additions (no GIF picker, no PiP window, no message forwarding). Set homeserver to <code style="font-size:0.85em;color:#e88;background:rgba(152,0,0,0.08);padding:1px 5px;border-radius:4px;">matrix.lotusguild.org</code>.</p>
|
||||
<p class="client-card-desc">The upstream open source Cinny client, on the web and as a desktop app for Windows, macOS and Linux. It has the same Discord like UI and space navigation as Lotus Chat, and now includes voice/video calls, voice rooms and screenshare through embedded Element Call, with ringing for DM calls. It lacks our custom additions (no GIF picker, no PiP window, no message forwarding). Set homeserver to <code style="font-size:0.85em;color:#e88;background:rgba(152,0,0,0.08);padding:1px 5px;border-radius:4px;">matrix.lotusguild.org</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="client-group">
|
||||
<p class="client-group-label">Mobile — iOS & Android</p>
|
||||
<p class="client-group-label">Mobile: iOS & Android</p>
|
||||
<div class="client-cards">
|
||||
<div class="client-card">
|
||||
<div class="client-card-top">
|
||||
@@ -705,7 +705,7 @@
|
||||
<span class="tag voice">Voice & Video</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="client-card-desc">Element's next-generation mobile client for iOS and Android, built on the Rust SDK with Simplified Sliding Sync for near-instant startup (the iOS app also runs on Apple Silicon Macs). Voice and video calls, 1:1 and group, via embedded Element Call (MatrixRTC). It can view but not start screenshares. Live location sharing, media captions, polls, pinned messages, a media browser and spaces with create and management, plus custom status on supported homeservers. Threads are in Labs. Rust crypto (Vodozemac).</p>
|
||||
<p class="client-card-desc">Element's next generation mobile client for iOS and Android, built on the Rust SDK with Simplified Sliding Sync for near instant startup (the iOS app also runs on Apple Silicon Macs). Voice and video calls, 1:1 and group, via embedded Element Call (MatrixRTC). It can view but not start screenshares. Live location sharing, media captions, polls, pinned messages, a media browser and spaces with create and management, plus custom status on supported homeservers. Threads are in Labs. Rust crypto (Vodozemac).</p>
|
||||
</div>
|
||||
<div class="client-card">
|
||||
<div class="client-card-top">
|
||||
@@ -719,13 +719,13 @@
|
||||
<span class="tag warn">Voice & Video (Experimental)</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="client-card-desc">Simple, beginner-friendly Matrix client with a WhatsApp/Telegram-style design, available on Android, iOS, web and Linux desktop. Built on the Dart SDK with Vodozemac encryption. Supports threads, polls, image captions, custom sticker packs, voice messages and spaces. 1:1 voice and video calls exist but remain experimental: they are off by default, DM-only, legacy WebRTC, and there are no group calls.</p>
|
||||
<p class="client-card-desc">Simple, beginner friendly Matrix client with a WhatsApp/Telegram style design, available on Android, iOS, web and Linux desktop. Built on the Dart SDK with Vodozemac encryption. Supports threads, polls, image captions, custom sticker packs, voice messages and spaces. 1:1 voice and video calls exist but remain experimental: they are off by default, DM only, legacy WebRTC, and there are no group calls.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="client-group">
|
||||
<p class="client-group-label">Discord-like — Android, Windows, Linux & Web</p>
|
||||
<p class="client-group-label">Like Discord: Android, Windows, Linux & Web</p>
|
||||
<div class="client-cards">
|
||||
<div class="client-card">
|
||||
<div class="client-card-top">
|
||||
@@ -739,13 +739,13 @@
|
||||
<span class="tag voice">Voice, Video & Screenshare</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="client-card-desc">Discord-style client built with Flutter. Multi-account support with all accounts signed in at once, built-in GIF search (Tenor through a privacy proxy, uploaded to your homeserver), shared calendar and photo-album rooms, polls, threads and widgets (new in v0.5.0). 1:1 calls use WebRTC and voice channels use MatrixRTC/LiveKit, with screenshare on desktop, Android and web. Encrypted group calls are experimental. Available for Windows, Linux, Android and on the web at app.commet.chat. Actively developed; macOS and iOS are planned.</p>
|
||||
<p class="client-card-desc">Discord style client built with Flutter. Multi account support with all accounts signed in at once, built in GIF search (Tenor through a privacy proxy, uploaded to your homeserver), shared calendar and photo album rooms, polls, threads and widgets (new in v0.5.0). 1:1 calls use WebRTC and voice channels use MatrixRTC/LiveKit, with screenshare on desktop, Android and web. Encrypted group calls are experimental. Available for Windows, Linux, Android and on the web at app.commet.chat. Actively developed; macOS and iOS are planned.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="client-group">
|
||||
<p class="client-group-label">Desktop — Windows, macOS & Linux</p>
|
||||
<p class="client-group-label">Desktop: Windows, macOS & Linux</p>
|
||||
<div class="client-cards">
|
||||
<div class="client-card">
|
||||
<div class="client-card-top">
|
||||
@@ -785,7 +785,7 @@
|
||||
<div class="comparison-section">
|
||||
<p class="comparison-title">Client Feature Comparison</p>
|
||||
<p class="reviewed"><!-- BEGIN:reviewed -->
|
||||
Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
Client comparison last reviewed <time datetime="2026-09-26">September 26, 2026</time>
|
||||
<!-- END:reviewed --></p>
|
||||
<p class="scroll-hint" id="scrollHint">← swipe to compare →</p>
|
||||
<div class="table-wrap">
|
||||
@@ -861,10 +861,10 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td class="ours"><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>Linux: click opens chat, Mark-as-read/Mute actions; no inline reply</small></td>
|
||||
<td><span class="yes">✓</span><small>Windows & Linux: click-to-open, inline reply, call accept/decline</small></td>
|
||||
<td><span class="part">~</span><small>Linux: click opens chat, Mark as read/Mute actions; no inline reply</small></td>
|
||||
<td><span class="yes">✓</span><small>Windows & Linux: click to open, inline reply, call accept/decline</small></td>
|
||||
<td><span class="part">~</span></td>
|
||||
<td><span class="yes">✓</span><small>Linux inline reply (D-Bus), macOS quick reply, click-to-open</small></td>
|
||||
<td><span class="yes">✓</span><small>Linux inline reply (D-Bus), macOS quick reply, click to open</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Windows Jump List (recent rooms)</td>
|
||||
@@ -877,7 +877,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Taskbar + volume-flyout call controls</td>
|
||||
<td>Taskbar + volume flyout call controls</td>
|
||||
<td class="ours"><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -887,7 +887,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Focus Assist → auto Do-Not-Disturb</td>
|
||||
<td>Focus Assist → auto Do Not Disturb</td>
|
||||
<td class="ours"><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -907,7 +907,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Recursive folder drag-drop upload</td>
|
||||
<td>Recursive folder drag drop upload</td>
|
||||
<td class="ours"><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -939,7 +939,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device verification</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>SAS emoji, cross-client requests show inline card</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>SAS emoji, cross client requests show inline card</small></td>
|
||||
<td><span class="part">~</span><small>own devices only (emoji + recovery key)</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
@@ -970,18 +970,18 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Noise suppression<small>filter background noise from mic</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>3 tiers: off / browser-native /<br>on-device ML (RNNoise, Speex,<br>DTLN, DeepFilterNet 3),<br>works on self-hosted SFU</small></td>
|
||||
<td><span class="part">~</span><small>browser-native<br>via Element Call</small></td>
|
||||
<td><span class="part">~</span><small>browser-native</small></td>
|
||||
<td><span class="part">~</span><small>WebRTC-native</small></td>
|
||||
<td><span class="part">~</span><small>browser-native (WebRTC)</small></td>
|
||||
<td><span class="part">~</span><small>browser-native (WebRTC noiseSuppression toggle)</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>3 tiers: off / browser native /<br>on device ML (RNNoise, Speex,<br>DTLN, DeepFilterNet 3),<br>works on self hosted SFU</small></td>
|
||||
<td><span class="part">~</span><small>browser native<br>via Element Call</small></td>
|
||||
<td><span class="part">~</span><small>browser native</small></td>
|
||||
<td><span class="part">~</span><small>WebRTC native</small></td>
|
||||
<td><span class="part">~</span><small>browser native (WebRTC)</small></td>
|
||||
<td><span class="part">~</span><small>browser native (WebRTC noiseSuppression toggle)</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Push-to-Talk<small>hold key to transmit</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>configurable hold key,<br>PTT badge in call bar;<br>M = push-to-deafen;<br>system-wide on Windows desktop</small></td>
|
||||
<td><span class="part">~</span><small>hold Space while muted (Element Call built-in); no configurable key</small></td>
|
||||
<td>Push to Talk<small>hold key to transmit</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>configurable hold key,<br>PTT badge in call bar;<br>M = push to deafen;<br>system wide on Windows desktop</small></td>
|
||||
<td><span class="part">~</span><small>hold Space while muted (Element Call built in); no configurable key</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -989,8 +989,8 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AFK auto-mute<small>silence mic after idle timeout</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>1–30 min timeout,<br>toast notification</small></td>
|
||||
<td>AFK auto mute<small>silence mic after idle timeout</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>1 to 30 min timeout,<br>toast notification</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -999,8 +999,8 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Voice channel user limit<small>admin-set max participants</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>per-room cap,<br>server-enforced<br>for all clients</small></td>
|
||||
<td>Voice channel user limit<small>admin set max participants</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>per room cap,<br>server enforced<br>for all clients</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1030,7 +1030,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Incoming call notification<small>ring + Answer/Decline</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>DMs & group chats;<br>ring tone, auto-dismiss</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>DMs & group chats;<br>ring tone, auto dismiss</small></td>
|
||||
<td><span class="yes">✓</span><small>rings for DM calls (Answer/Reject); silent prompt for group calls</small></td>
|
||||
<td><span class="yes">✓</span><small>native push</small></td>
|
||||
<td><span class="part">~</span><small>experimental</small></td>
|
||||
@@ -1041,17 +1041,17 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<tr class="section-header"><td colspan="8">Core Features</td></tr>
|
||||
<tr>
|
||||
<td>Spaces</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best-in-class sub-space nav</small></td>
|
||||
<td><span class="yes">✓</span><small>best-in-class sub-space nav</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best in class subspace nav</small></td>
|
||||
<td><span class="yes">✓</span><small>best in class subspace nav</small></td>
|
||||
<td><span class="yes">✓</span><small>dedicated spaces tab,<br>full management</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="yes">✓</span><small>Discord-like categories</small></td>
|
||||
<td><span class="yes">✓</span><small>sub-spaces clunky</small></td>
|
||||
<td><span class="yes">✓</span><small>Discord like categories</small></td>
|
||||
<td><span class="yes">✓</span><small>subspaces clunky</small></td>
|
||||
<td><span class="part">~</span><small>limited</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Threads</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>side panel + Slack-style per-thread notifications</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>side panel + Slack style per thread notifications</small></td>
|
||||
<td><span class="part">~</span><small>basic, no dedicated view</small></td>
|
||||
<td><span class="part">~</span><small>Labs flag</small></td>
|
||||
<td><span class="yes">✓</span><small>thread view since v2.3.0</small></td>
|
||||
@@ -1091,7 +1091,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Custom emoji & stickers</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best-in-class</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best in class</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="part">~</span></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
@@ -1101,7 +1101,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GIF search / picker</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>Giphy, Terminal TDS themed,<br>click-outside to close</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>Giphy, Terminal TDS themed,<br>click outside to close</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1111,11 +1111,11 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Message search (encrypted)</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>local cache scan; load-more<br>buttons extend history per room</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>local cache scan; load more<br>buttons extend history per room</small></td>
|
||||
<td><span class="part">~</span><small>server search only;<br>no E2EE support</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>per-room; downloads & decrypts history client-side</small></td>
|
||||
<td><span class="yes">✓</span><small>client-side; auto-fetches +<br>decrypts history during search</small></td>
|
||||
<td><span class="part">~</span><small>per room; downloads & decrypts history client side</small></td>
|
||||
<td><span class="yes">✓</span><small>client side; auto fetches +<br>decrypts history during search</small></td>
|
||||
<td><span class="part">~</span><small>desktop only, not web</small></td>
|
||||
<td><span class="part">~</span><small>local DB scan</small></td>
|
||||
</tr>
|
||||
@@ -1131,11 +1131,11 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr class="section-header"><td colspan="8">UX & Extras</td></tr>
|
||||
<tr>
|
||||
<td>Multi-account</td>
|
||||
<td>Multi account</td>
|
||||
<td class="ours"><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span><small>account switcher; multi-account push since v2.6.0</small></td>
|
||||
<td><span class="yes">✓</span><small>account switcher; multi account push since v2.6.0</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span><small>CLI profiles only</small></td>
|
||||
@@ -1151,12 +1151,12 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="part">~</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Discord-like UI</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best-in-class for web</small></td>
|
||||
<td>Discord like UI</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>best in class for web</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span><small>WhatsApp/Telegram style</small></td>
|
||||
<td><span class="yes">✓</span><small>Discord-like layout</small></td>
|
||||
<td><span class="yes">✓</span><small>Discord like layout</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
@@ -1172,7 +1172,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Night Light / Blue Light Filter<small>warm overlay, adjustable intensity</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>5–80% intensity slider,<br>Settings → Appearance</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>5 to 80% intensity slider,<br>Settings → Appearance</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1181,7 +1181,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Animated chat backgrounds<small>CSS-only, GPU-accelerated</small></td>
|
||||
<td>Animated chat backgrounds<small>CSS only, GPU accelerated</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>5 animated wallpapers (rain,<br>stars, grid pulse, aurora,<br>fireflies); pause toggle</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1214,14 +1214,14 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td>Message forwarding</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>forward to any room</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span><small>Forward action; multi-room on Android</small></td>
|
||||
<td><span class="yes">✓</span><small>Forward action; multi room on Android</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Per-message read receipts<small>who read each message</small></td>
|
||||
<td>Per message read receipts<small>who read each message</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>avatar pill below message,<br>click for list + timestamps</small></td>
|
||||
<td><span class="yes">✓</span><small>'Read Receipts' in message menu lists readers</small></td>
|
||||
<td><span class="yes">✓</span><small>avatar thumbnails</small></td>
|
||||
@@ -1232,10 +1232,10 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Who reacted<small>see who reacted with each emoji</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>hover tooltip with names;<br>right-click for full avatar modal</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>hover tooltip with names;<br>right click for full avatar modal</small></td>
|
||||
<td><span class="yes">✓</span><small>hover tooltip + 'View Reactions' viewer</small></td>
|
||||
<td><span class="yes">✓</span><small>long-press reaction for summary sheet</small></td>
|
||||
<td><span class="yes">✓</span><small>long-press reaction</small></td>
|
||||
<td><span class="yes">✓</span><small>long press reaction for summary sheet</small></td>
|
||||
<td><span class="yes">✓</span><small>long press reaction</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
<td><span class="yes">✓</span><small>hover tooltip lists reactors</small></td>
|
||||
<td><span class="yes">✓</span></td>
|
||||
@@ -1252,7 +1252,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Custom status message<small>shown below username</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>emoji picker, auto-clear timer<br>(30 min – 7 days), 64-char limit</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>emoji picker, auto clear timer<br>(30 min to 7 days), 64 char limit</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>emoji + text status (needs server support)</small></td>
|
||||
<td><span class="yes">✓</span><small>Set status; shown under DM header & in profile</small></td>
|
||||
@@ -1261,18 +1261,18 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="yes">✓</span><small>shown next to sender name in timeline & in profile</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Online presence tracking<small>idle/away auto-detection</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>online on start, idle after 10 min,<br>unavailable when tab hidden,<br>offline on close; hide-status toggle</small></td>
|
||||
<td>Online presence tracking<small>idle/away auto detection</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>online on start, idle after 10 min,<br>unavailable when tab hidden,<br>offline on close; hide status toggle</small></td>
|
||||
<td><span class="part">~</span><small>shows others' status; no idle detection</small></td>
|
||||
<td><span class="part">~</span><small>reports own presence; doesn't show others'</small></td>
|
||||
<td><span class="part">~</span><small>basic online/offline only</small></td>
|
||||
<td><span class="part">~</span><small>sets 'unavailable' 15s after the app loses focus; no input-idle timer</small></td>
|
||||
<td><span class="part">~</span><small>3-min idle → away; no hide toggle</small></td>
|
||||
<td><span class="part">~</span><small>sets 'unavailable' 15s after the app loses focus; no input idle timer</small></td>
|
||||
<td><span class="part">~</span><small>3 min idle → away; no hide toggle</small></td>
|
||||
<td><span class="part">~</span><small>auto: unavailable ~30 s after losing focus</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Media Gallery<small>browse room images/videos/files</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>right-side drawer;<br>Images/Videos/Files tabs</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>right side drawer;<br>Images/Videos/Files tabs</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span><small>"Media and files" browser in room info</small></td>
|
||||
<td><span class="yes">✓</span><small>Gallery & Files tabs in chat search</small></td>
|
||||
@@ -1311,8 +1311,8 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Custom notification sounds<small>per-category sound selector</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>per-category sound selector; ▶ preview</small></td>
|
||||
<td>Custom notification sounds<small>per category sound selector</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>per category sound selector; ▶ preview</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>iOS: choose alert tone (global)</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1336,8 +1336,8 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>sort by activity only</small></td>
|
||||
<td><span class="part">~</span><small>activity only (favourites first, low priority last)</small></td>
|
||||
<td><span class="part">~</span><small>manual drag-reorder; no sort selector</small></td>
|
||||
<td><span class="yes">✓</span><small>Activity, A-Z or Unread-first</small></td>
|
||||
<td><span class="part">~</span><small>manual drag reorder; no sort selector</small></td>
|
||||
<td><span class="yes">✓</span><small>Activity, A to Z or Unread first</small></td>
|
||||
<td><span class="yes">✓</span><small>by importance/unread or alphabetical</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1352,7 +1352,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Export room history<small>download messages as file</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>txt/json/html, date range,<br>E2EE-aware</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>txt/json/html, date range,<br>E2EE aware</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1372,7 +1372,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Message bookmarks / saved messages</td>
|
||||
<td class="ours"><span class="yes">✓</span><small>right-click bookmark,<br>sidebar panel, syncs across devices</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>right click bookmark,<br>sidebar panel, syncs across devices</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1381,7 +1381,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Collapsible long messages<small>auto-collapse >20 lines</small></td>
|
||||
<td>Collapsible long messages<small>auto collapse >20 lines</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>"Read more" toggle,<br>threshold configurable</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1391,7 +1391,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inline GIF preview<small>Giphy / Tenor links auto-embed</small></td>
|
||||
<td>Inline GIF preview<small>Giphy / Tenor links auto embed</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>via homeserver proxy,<br>no direct CDN contact</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1421,18 +1421,18 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quick emoji reactions on hover<small>1-click react, no menu needed</small></td>
|
||||
<td>Quick emoji reactions on hover<small>one click react, no menu needed</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>3 recent emoji in hover bar;<br>dismisses emoji picker</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span><small>hover bar shows up to 4 recent reactions, 1-click</small></td>
|
||||
<td><span class="yes">✓</span><small>hover bar shows up to 4 recent reactions, one click</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="yes">✓</span><small>hover bar shows recent reactions, 1-click</small></td>
|
||||
<td><span class="yes">✓</span><small>hover bar shows recent reactions, one click</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>In-app notification toasts<small>TDS-styled, when window focused</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>slides in bottom-right;<br>4 s auto-dismiss, click to jump</small></td>
|
||||
<td>In app notification toasts<small>TDS styled, when window focused</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>slides in bottom right;<br>4 s auto dismiss, click to jump</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1441,8 +1441,8 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<td><span class="no">✗</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>On-device message translation<small>read foreign messages in your language</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>100% on-device browser AI;<br>works in E2EE rooms, no cloud;<br>Chromium desktop & Lotus app</small></td>
|
||||
<td>On device message translation<small>read foreign messages in your language</small></td>
|
||||
<td class="ours"><span class="yes">✓</span><small>100% on device browser AI;<br>works in E2EE rooms, no cloud;<br>Chromium desktop & Lotus app</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
<td><span class="part">~</span><small>iOS only (Apple Translation)</small></td>
|
||||
<td><span class="no">✗</span></td>
|
||||
@@ -1456,7 +1456,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
</div><!-- table-wrap -->
|
||||
|
||||
<div class="security-note" style="margin:14px 16px 6px;">
|
||||
<strong>Encryption architecture:</strong> Element X uses the native <strong>matrix-rust-sdk</strong> with Vodozemac. FluffyChat and Commet use <strong>matrix-dart-sdk</strong>, which also wraps Vodozemac for its crypto — all three benefit from Vodozemac's stronger security track record over the older JavaScript SDK. Cinny and Element Web/Desktop currently use <strong>matrix-js-sdk</strong>; Element is actively migrating to the Rust SDK. Clients using Vodozemac were not affected by historical js-sdk vulnerabilities.
|
||||
<strong>Encryption architecture:</strong> Element X uses the native <strong>matrix-rust-sdk</strong> with Vodozemac. FluffyChat and Commet use <strong>matrix-dart-sdk</strong>, which also wraps Vodozemac for its crypto, so all three benefit from Vodozemac's stronger security track record over the older JavaScript SDK. Cinny and Element Web/Desktop currently use <strong>matrix-js-sdk</strong>; Element is actively migrating to the Rust SDK. Clients using Vodozemac were not affected by historical js-sdk vulnerabilities.
|
||||
</div>
|
||||
|
||||
<div class="legend">
|
||||
@@ -1473,7 +1473,7 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<div class="info-label">Access</div>
|
||||
<div class="info-value">Invite-only</div>
|
||||
<div class="info-value">Invite only</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Max Upload</div>
|
||||
@@ -1499,16 +1499,16 @@ Client comparison last reviewed <time datetime="2026-09-26">2026-09-26</time>
|
||||
<div class="privacy-strip">
|
||||
<span class="privacy-badge">No ads or tracking</span>
|
||||
<span class="privacy-badge">No data sold</span>
|
||||
<span class="privacy-badge">E2EE — server cannot read encrypted rooms</span>
|
||||
<span class="privacy-badge">E2EE: the server cannot read encrypted rooms</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="legal-note">
|
||||
This service is provided "as-is" with no uptime guarantee. Not for emergency use — do not use to contact emergency services (e.g. 911). Use is governed by our <a href="https://wiki.lotusguild.org/en/Legal/terms-of-service" target="_blank" rel="noopener">Terms of Service</a> and <a href="https://wiki.lotusguild.org/en/Legal/privacy-policy" target="_blank" rel="noopener">Privacy Policy</a>. Governing law: State of Ohio, United States.
|
||||
This service is provided "as is" with no uptime guarantee. Not for emergency use. Do not use to contact emergency services (e.g. 911). Use is governed by our <a href="https://wiki.lotusguild.org/en/Legal/terms-of-service" target="_blank" rel="noopener">Terms of Service</a> and <a href="https://wiki.lotusguild.org/en/Legal/privacy-policy" target="_blank" rel="noopener">Privacy Policy</a>. Governing law: State of Ohio, United States.
|
||||
</div>
|
||||
|
||||
<div class="contact">
|
||||
<p style="font-size:0.85rem;color:#777;margin-bottom:4px;">Questions or need a registration token?</p>
|
||||
<p style="font-size:0.85rem;color:#777;margin-bottom:4px;">Questions or need an account?</p>
|
||||
<p>Reach out to <code class="homeserver">@jared:matrix.lotusguild.org</code></p>
|
||||
</div>
|
||||
|
||||
|
||||
+2
-2
@@ -418,12 +418,12 @@ th:first-child {
|
||||
background: #111;
|
||||
}
|
||||
tr.section-header td {
|
||||
/* section headers span full width — override sticky bg */
|
||||
/* section headers span full width: override sticky bg */
|
||||
position: static;
|
||||
background: rgba(152,0,0,0.06);
|
||||
}
|
||||
|
||||
/* Scroll hint — visible only on mobile via JS class */
|
||||
/* Scroll hint: visible only on mobile via JS class */
|
||||
.scroll-hint {
|
||||
display: none;
|
||||
font-size: 0.72rem;
|
||||
|
||||
@@ -389,3 +389,146 @@ class NormalizePermissionTest(unittest.TestCase):
|
||||
guard.livekit_update_participant = lambda *a: None
|
||||
participant = {"identity": "@a:x:DEV", "permission": {"canPublish": True, "canPublishSources": ["CAMERA"]}}
|
||||
self.assertFalse(guard.reconcile_participant("!r:x", participant, {"SCREEN_SHARE"}))
|
||||
|
||||
|
||||
class SlotReservationTests(unittest.TestCase):
|
||||
"""[matrix #25] Simultaneous joins can't both pass a full room."""
|
||||
|
||||
def test_second_simultaneous_join_is_blocked(self):
|
||||
r = guard.SlotReservations(ttl=30)
|
||||
present = set()
|
||||
counted = present | r.reserved("room", present, now=0)
|
||||
self.assertFalse(guard.should_block(1, counted, "@a:x"))
|
||||
r.reserve("room", "@a:x", now=0)
|
||||
# @b asks a moment later, before @a has connected to LiveKit.
|
||||
counted = present | r.reserved("room", present, now=1)
|
||||
self.assertTrue(guard.should_block(1, counted, "@b:x"))
|
||||
# @a asking again (second device) is still allowed.
|
||||
self.assertFalse(guard.should_block(1, counted, "@a:x"))
|
||||
|
||||
def test_reservation_expires_and_clears_once_present(self):
|
||||
r = guard.SlotReservations(ttl=30)
|
||||
r.reserve("room", "@a:x", now=0)
|
||||
self.assertEqual(r.reserved("room", set(), now=31), set())
|
||||
r.reserve("room", "@a:x", now=40)
|
||||
self.assertEqual(r.reserved("room", {"@a:x"}, now=41), set())
|
||||
|
||||
def test_room_lock_is_per_room(self):
|
||||
r = guard.SlotReservations()
|
||||
self.assertIs(r.room_lock("a"), r.room_lock("a"))
|
||||
self.assertIsNot(r.room_lock("a"), r.room_lock("b"))
|
||||
|
||||
|
||||
def _p(identity, joined_ms):
|
||||
return {"identity": identity, "joined_at_ms": str(joined_ms),
|
||||
"permission": {"canPublish": True, "canPublishSources": ["MICROPHONE"]}}
|
||||
|
||||
|
||||
class TestOverLimitRemovals(unittest.TestCase):
|
||||
"""[matrix #25] connect-time enforcement of the voice limit."""
|
||||
|
||||
def test_first_sweep_records_and_removes_nobody(self):
|
||||
parts = [_p("@a:x:DEV1", 1), _p("@b:x:DEV1", 2)]
|
||||
removals, seen = guard.over_limit_removals(parts, 1, None)
|
||||
self.assertEqual(removals, [])
|
||||
self.assertEqual(seen, {"@a:x", "@b:x"})
|
||||
|
||||
def test_a_newcomer_past_the_limit_is_removed_with_all_devices(self):
|
||||
parts = [_p("@a:x:DEV1", 1), _p("@b:x:DEV1", 5), _p("@b:x:DEV2", 6)]
|
||||
removals, seen = guard.over_limit_removals(parts, 1, {"@a:x"})
|
||||
self.assertEqual(sorted(removals), ["@b:x:DEV1", "@b:x:DEV2"])
|
||||
self.assertEqual(seen, {"@a:x"})
|
||||
|
||||
def test_newest_newcomers_go_first(self):
|
||||
parts = [_p("@a:x:D", 1), _p("@b:x:D", 10), _p("@c:x:D", 20)]
|
||||
removals, _ = guard.over_limit_removals(parts, 2, {"@a:x"})
|
||||
self.assertEqual(removals, ["@c:x:D"])
|
||||
|
||||
def test_lowering_the_limit_mid_call_kicks_nobody(self):
|
||||
parts = [_p("@a:x:D", 1), _p("@b:x:D", 2), _p("@c:x:D", 3)]
|
||||
removals, seen = guard.over_limit_removals(parts, 1, {"@a:x", "@b:x", "@c:x"})
|
||||
self.assertEqual(removals, [])
|
||||
self.assertEqual(seen, {"@a:x", "@b:x", "@c:x"})
|
||||
|
||||
def test_extra_devices_of_a_present_user_are_not_newcomers(self):
|
||||
parts = [_p("@a:x:DEV1", 1), _p("@a:x:DEV2", 9)]
|
||||
removals, _ = guard.over_limit_removals(parts, 1, {"@a:x"})
|
||||
self.assertEqual(removals, [])
|
||||
|
||||
def test_no_limit_removes_nobody(self):
|
||||
parts = [_p("@a:x:D", 1), _p("@b:x:D", 2)]
|
||||
self.assertEqual(guard.over_limit_removals(parts, 0, {"@a:x"})[0], [])
|
||||
|
||||
def test_joined_at_seconds_are_understood(self):
|
||||
parts = [{"identity": "@a:x:D", "joined_at": "100"}, {"identity": "@b:x:D", "joined_at": "200"},
|
||||
{"identity": "@c:x:D", "joinedAt": "150"}]
|
||||
removals, _ = guard.over_limit_removals(parts, 1, set())
|
||||
self.assertEqual(sorted(removals), ["@b:x:D", "@c:x:D"])
|
||||
|
||||
|
||||
class TestReconcileRoomLimit(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self._orig = (guard.room_state, guard.livekit_list_participants,
|
||||
guard.livekit_update_participant, guard.livekit_remove_participant)
|
||||
self.removed, self.updates = [], []
|
||||
guard.livekit_remove_participant = lambda a, i: self.removed.append(i)
|
||||
guard.livekit_update_participant = lambda a, i, p: self.updates.append(i)
|
||||
guard._seen_users.clear()
|
||||
|
||||
def tearDown(self):
|
||||
(guard.room_state, guard.livekit_list_participants,
|
||||
guard.livekit_update_participant, guard.livekit_remove_participant) = self._orig
|
||||
guard._seen_users.clear()
|
||||
|
||||
def test_a_late_connect_with_an_early_token_is_removed(self):
|
||||
guard.room_state = lambda rid, max_age=0: {"max_users": 1, "allow_screenshare": True, "allow_camera": True}
|
||||
guard.livekit_list_participants = lambda a: [_p("@a:x:D", 1)]
|
||||
guard.reconcile_room("alias", "!room:x") # first sweep: @a is there
|
||||
self.assertEqual(self.removed, [])
|
||||
guard.livekit_list_participants = lambda a: [_p("@a:x:D", 1), _p("@late:x:D", 50)]
|
||||
guard.reconcile_room("alias", "!room:x")
|
||||
self.assertEqual(self.removed, ["@late:x:D"])
|
||||
self.assertEqual(self.updates, []) # nothing forbidden in this room
|
||||
|
||||
def test_unlimited_unrestricted_room_is_not_listed(self):
|
||||
guard.room_state = lambda rid, max_age=0: {"max_users": 0, "allow_screenshare": True, "allow_camera": True}
|
||||
guard.livekit_list_participants = lambda a: (_ for _ in ()).throw(AssertionError("listed"))
|
||||
guard.reconcile_room("alias", "!room:x")
|
||||
self.assertEqual(self.removed, [])
|
||||
|
||||
|
||||
class LimitExemptTests(unittest.TestCase):
|
||||
"""A voice bridge's bot listens in the call but isn't a person."""
|
||||
|
||||
BOT = "@lotus-voice_bot:matrix.lotusguild.org"
|
||||
GHOST = "@lotus-voice_1565220670265360514:matrix.lotusguild.org"
|
||||
|
||||
def setUp(self):
|
||||
self._saved = guard.LIMIT_EXEMPT
|
||||
guard.LIMIT_EXEMPT = guard.re.compile(r"@lotus-voice_bot:matrix\.lotusguild\.org")
|
||||
|
||||
def tearDown(self):
|
||||
guard.LIMIT_EXEMPT = self._saved
|
||||
|
||||
def test_bot_does_not_use_a_slot(self):
|
||||
self.assertFalse(guard.should_block(2, {"@a:x", self.BOT}, "@b:x"))
|
||||
self.assertTrue(guard.should_block(2, {"@a:x", "@c:x", self.BOT}, "@b:x"))
|
||||
|
||||
def test_bot_is_never_blocked(self):
|
||||
self.assertFalse(guard.should_block(1, {"@a:x"}, self.BOT))
|
||||
|
||||
def test_relayed_discord_speakers_still_count(self):
|
||||
self.assertTrue(guard.should_block(2, {"@a:x", self.GHOST}, "@b:x"))
|
||||
|
||||
def test_reconcile_never_removes_or_counts_the_bot(self):
|
||||
parts = [
|
||||
{"identity": "@a:x:D1", "joined_at_ms": 1},
|
||||
{"identity": self.BOT + ":voice-1", "joined_at_ms": 3},
|
||||
]
|
||||
removals, users = guard.over_limit_removals(parts, 1, {"@a:x"})
|
||||
self.assertEqual(removals, [])
|
||||
self.assertEqual(users, {"@a:x"})
|
||||
|
||||
def test_no_exemption_configured_counts_everyone(self):
|
||||
guard.LIMIT_EXEMPT = None
|
||||
self.assertTrue(guard.should_block(2, {"@a:x", self.BOT}, "@b:x"))
|
||||
@@ -52,6 +52,7 @@ import hashlib
|
||||
import hmac
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import threading
|
||||
import time
|
||||
import urllib.error
|
||||
@@ -72,6 +73,11 @@ MATRIX_TOKEN = os.environ.get("MATRIX_TOKEN", "")
|
||||
# from participants who joined BEFORE a policy tightened. New joins are already
|
||||
# handled by the JWT re-sign at issue time; this closes the mid-call-flip gap.
|
||||
RECONCILE_ENABLED = os.environ.get("GUARD_RECONCILE", "1") not in ("0", "false", "")
|
||||
# Matrix users the participant limit ignores (full-match regex), e.g. a voice
|
||||
# bridge's own bot, which joins the call to listen but is not a person. The
|
||||
# Discord speakers the bridge relays (its ghost users) are people and still count.
|
||||
_EXEMPT = os.environ.get("VOICE_LIMIT_EXEMPT_USERS", "")
|
||||
LIMIT_EXEMPT = re.compile(_EXEMPT) if _EXEMPT else None
|
||||
# Floor the interval so a misconfigured 0 can't busy-loop the admin/Synapse APIs.
|
||||
RECONCILE_INTERVAL = max(0.5, float(os.environ.get("GUARD_RECONCILE_INTERVAL", "3.0")))
|
||||
|
||||
@@ -131,18 +137,61 @@ def room_id_from_request(path: str, data: dict) -> str:
|
||||
return data.get("room") or ""
|
||||
|
||||
|
||||
def limit_exempt(user: str) -> bool:
|
||||
"""True for users the participant limit ignores (VOICE_LIMIT_EXEMPT_USERS)."""
|
||||
return bool(LIMIT_EXEMPT and user and LIMIT_EXEMPT.fullmatch(user))
|
||||
|
||||
|
||||
def should_block(limit: int, present_users: set, requester: str) -> bool:
|
||||
"""Pure decision: should this token be refused?
|
||||
|
||||
- limit <= 0 -> never block (no limit configured)
|
||||
- requester exempt -> never block (e.g. a bridge's bot)
|
||||
- requester already present -> never block (rejoin / extra device)
|
||||
- distinct users >= limit -> block
|
||||
- distinct non-exempt users >= limit -> block
|
||||
"""
|
||||
if limit <= 0:
|
||||
return False
|
||||
if limit_exempt(requester):
|
||||
return False
|
||||
if requester and requester in present_users:
|
||||
return False
|
||||
return len(present_users) >= limit
|
||||
return len({u for u in present_users if not limit_exempt(u)}) >= limit
|
||||
|
||||
|
||||
# [matrix #25] Tokens issued but not yet connected weren't counted, so two
|
||||
# users pressing Join together could both pass a 1-person limit. Each admitted
|
||||
# user holds a short reservation (counted like a present user) until LiveKit
|
||||
# lists them or it expires; checks for a room are serialised with a lock.
|
||||
RESERVATION_TTL = 30.0
|
||||
|
||||
|
||||
class SlotReservations:
|
||||
"""Per-room reservations for admitted-but-not-yet-connected users."""
|
||||
|
||||
def __init__(self, ttl: float = RESERVATION_TTL):
|
||||
self.ttl = ttl
|
||||
self._by_room = {} # alias -> {user: expiry}
|
||||
self._guard = threading.Lock()
|
||||
self._room_locks = {}
|
||||
|
||||
def room_lock(self, alias: str) -> threading.Lock:
|
||||
with self._guard:
|
||||
return self._room_locks.setdefault(alias, threading.Lock())
|
||||
|
||||
def reserved(self, alias: str, present: set, now: float) -> set:
|
||||
"""Unexpired reservations; drops expired ones and users now present."""
|
||||
room = self._by_room.get(alias, {})
|
||||
for user in [u for u, exp in room.items() if exp <= now or u in present]:
|
||||
del room[user]
|
||||
return set(room)
|
||||
|
||||
def reserve(self, alias: str, user: str, now: float) -> None:
|
||||
if user:
|
||||
self._by_room.setdefault(alias, {})[user] = now + self.ttl
|
||||
|
||||
|
||||
RESERVATIONS = SlotReservations()
|
||||
|
||||
|
||||
def allowed_sources(policy: dict):
|
||||
@@ -370,6 +419,7 @@ def remember_room(alias: str, room_id: str) -> None:
|
||||
def forget_room(alias: str) -> None:
|
||||
with _alias_lock:
|
||||
_alias_to_room.pop(alias, None)
|
||||
_seen_users.pop(alias, None)
|
||||
|
||||
|
||||
def forbidden_sources(policy: dict) -> set:
|
||||
@@ -416,6 +466,65 @@ def normalize_permission(perm: dict) -> dict:
|
||||
return out
|
||||
|
||||
|
||||
def _joined_at(participant: dict) -> float:
|
||||
"""When this device joined, in ms (ParticipantInfo joined_at_ms, else s)."""
|
||||
for key in ("joined_at_ms", "joinedAtMs"):
|
||||
if participant.get(key) not in (None, "", 0, "0"):
|
||||
return float(participant[key])
|
||||
for key in ("joined_at", "joinedAt"):
|
||||
if participant.get(key) not in (None, "", 0, "0"):
|
||||
return float(participant[key]) * 1000.0
|
||||
return 0.0
|
||||
|
||||
|
||||
def over_limit_removals(participants: list, limit: int, seen):
|
||||
"""[matrix #25] Pure: which devices to remove so the room is back within
|
||||
its limit, and the set of users now known to be in the room.
|
||||
|
||||
Only users who ARRIVED since the previous sweep (not in `seen`) can be
|
||||
removed, newest first: a token fetched while there was space can be used
|
||||
to connect up to an hour later, past the limit, but lowering the limit
|
||||
mid-call must not kick people already there. Users are distinct Matrix
|
||||
users (matrix_user), so a person's extra devices never count twice, and
|
||||
removing a user removes all their devices. `seen is None` means the room
|
||||
hasn't been swept yet: record it, remove nobody.
|
||||
"""
|
||||
first_join = {}
|
||||
identities = {}
|
||||
for p in participants:
|
||||
identity = p.get("identity") or ""
|
||||
user = matrix_user(identity)
|
||||
if not user or limit_exempt(user):
|
||||
continue
|
||||
identities.setdefault(user, []).append(identity)
|
||||
joined = _joined_at(p)
|
||||
first_join[user] = min(first_join.get(user, joined), joined)
|
||||
users = set(first_join)
|
||||
if seen is None or limit <= 0 or len(users) <= limit:
|
||||
return [], users
|
||||
newcomers = sorted(
|
||||
(u for u in users if u not in seen),
|
||||
key=lambda u: (first_join[u], u),
|
||||
reverse=True,
|
||||
)
|
||||
removed = newcomers[: len(users) - limit]
|
||||
return [i for u in removed for i in identities[u]], users - set(removed)
|
||||
|
||||
|
||||
def livekit_remove_participant(alias: str, identity: str) -> None:
|
||||
"""Disconnect a participant (livekit RemoveParticipant). Already gone ->
|
||||
Twirp not_found (HTTP 404), which is benign."""
|
||||
try:
|
||||
_livekit_admin_post(alias, "RemoveParticipant", {"room": alias, "identity": identity})
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code != 404:
|
||||
log(f"remove_participant {identity} in {alias} -> HTTP {exc.code}")
|
||||
|
||||
|
||||
# alias -> set of users present at the previous sweep (see over_limit_removals)
|
||||
_seen_users = {}
|
||||
|
||||
|
||||
def reconcile_participant(alias: str, participant: dict, forbidden: set) -> bool:
|
||||
"""Enforce the forbidden-source policy on one live participant. Returns True
|
||||
if an UpdateParticipant call was issued."""
|
||||
@@ -448,8 +557,10 @@ def reconcile_room(alias: str, room_id: str) -> None:
|
||||
# Read the policy fresh-ish so a flip is picked up within ~one interval.
|
||||
policy = room_state(room_id, max_age=RECONCILE_INTERVAL)
|
||||
forbidden = forbidden_sources(policy)
|
||||
if not forbidden:
|
||||
return # nothing restricted; leave permissions untouched
|
||||
limit = int(policy.get("max_users", 0) or 0)
|
||||
if not forbidden and limit <= 0:
|
||||
_seen_users.pop(alias, None)
|
||||
return # nothing restricted; leave the room alone
|
||||
try:
|
||||
participants = livekit_list_participants(alias)
|
||||
except urllib.error.HTTPError as exc:
|
||||
@@ -466,7 +577,18 @@ def reconcile_room(alias: str, room_id: str) -> None:
|
||||
# empty_timeout). Don't forget on an empty read — only a 404 (room gone)
|
||||
# prunes — so a transient empty/race can't drop mid-call enforcement.
|
||||
return
|
||||
# [matrix #25] Connect-time limit: the token check alone can't stop a token
|
||||
# fetched earlier (valid for an hour) from being used once the room is full.
|
||||
removals, now_seen = over_limit_removals(participants, limit, _seen_users.get(alias))
|
||||
_seen_users[alias] = now_seen
|
||||
for identity in removals:
|
||||
livekit_remove_participant(alias, identity)
|
||||
log(f"removed {identity} from {alias}: over the voice limit of {limit}")
|
||||
if not forbidden:
|
||||
return
|
||||
for p in participants:
|
||||
if p.get("identity") in removals:
|
||||
continue
|
||||
try:
|
||||
reconcile_participant(alias, p, forbidden)
|
||||
except Exception as exc:
|
||||
@@ -618,11 +740,16 @@ class Handler(BaseHTTPRequestHandler):
|
||||
# LiveKit-admin outage here cannot skip the publish-source policy below.
|
||||
if limit > 0 and alias:
|
||||
try:
|
||||
present = livekit_present_users(alias)
|
||||
if should_block(limit, present, requester):
|
||||
log(f"blocked {requester or '?'} from {room_id}: {len(present)}/{limit}")
|
||||
self._send_blocked()
|
||||
return
|
||||
with RESERVATIONS.room_lock(alias):
|
||||
present = livekit_present_users(alias)
|
||||
now = time.monotonic()
|
||||
counted = present | RESERVATIONS.reserved(alias, present, now)
|
||||
if should_block(limit, counted, requester):
|
||||
log(f"blocked {requester or '?'} from {room_id}: {len(counted)}/{limit}")
|
||||
self._send_blocked()
|
||||
return
|
||||
if requester not in present:
|
||||
RESERVATIONS.reserve(alias, requester, now)
|
||||
except Exception as exc:
|
||||
# Fail open on the limit only; still apply the policy below.
|
||||
log(f"limit check error for {room_id}: {exc}")
|
||||
|
||||
@@ -2273,7 +2273,9 @@ async def cmd_roast(client: AsyncClient, room_id: str, sender: str, args: str):
|
||||
f'<blockquote>{roast}</blockquote>'
|
||||
f'<sup><em>via {_model_label(CREATIVE_MODEL)}</em></sup>'
|
||||
)
|
||||
await send_html(client, room_id, plain, html)
|
||||
# Ping the person being roasted when they were named by Matrix ID.
|
||||
target_id = target_raw if re.fullmatch(r"@[^\s:]+:[^\s]+", target_raw) else None
|
||||
await send_html(client, room_id, plain, html, mention_user_ids=[target_id] if target_id else None)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
+15
-7
@@ -70,17 +70,25 @@ async def send_text(client: AsyncClient, room_id: str, text: str):
|
||||
return resp
|
||||
|
||||
|
||||
async def send_html(client: AsyncClient, room_id: str, plain: str, html: str):
|
||||
async def send_html(
|
||||
client: AsyncClient, room_id: str, plain: str, html: str, mention_user_ids: list[str] | None = None
|
||||
):
|
||||
logger = logging.getLogger("matrixbot")
|
||||
content = {
|
||||
"msgtype": "m.text",
|
||||
"body": plain,
|
||||
"format": "org.matrix.custom.html",
|
||||
"formatted_body": html,
|
||||
}
|
||||
# Explicit mentions (m.mentions). From Synapse 1.164 a name or user ID in
|
||||
# the body no longer pings anyone (MSC4210), so a message that should
|
||||
# notify someone has to say so.
|
||||
if mention_user_ids:
|
||||
content["m.mentions"] = {"user_ids": mention_user_ids}
|
||||
resp = await _room_send_trusted(
|
||||
client, room_id,
|
||||
message_type="m.room.message",
|
||||
content={
|
||||
"msgtype": "m.text",
|
||||
"body": plain,
|
||||
"format": "org.matrix.custom.html",
|
||||
"formatted_body": html,
|
||||
},
|
||||
content=content,
|
||||
)
|
||||
if not isinstance(resp, RoomSendResponse):
|
||||
logger.error("send_html failed: %s", resp)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[Unit]
|
||||
Description=Lotus voice bridge (Discord voice <-> Matrix calls, nether-voicebridge)
|
||||
After=network-online.target matrix-synapse.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=lotus-voice
|
||||
Group=lotus-voice
|
||||
Environment=CONFIG_PATH=/etc/lotus-voice/config.toml
|
||||
Environment=RUST_LOG=info
|
||||
ExecStart=/opt/lotus-voice/lotus-voice-bridge
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=lotus-voice-bridge
|
||||
|
||||
# Resource limits (Opus encode/decode + LiveKit + Discord voice per call)
|
||||
MemoryMax=1G
|
||||
CPUQuota=150%
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
PrivateTmp=yes
|
||||
ReadWritePaths=/var/lib/lotus-voice /etc/lotus-voice
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,30 @@
|
||||
[Unit]
|
||||
Description=mautrix-discord Matrix-Discord bridge
|
||||
After=network-online.target matrix-synapse.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=mautrix-discord
|
||||
Group=mautrix-discord
|
||||
WorkingDirectory=/opt/mautrix-discord
|
||||
ExecStart=/opt/mautrix-discord/mautrix-discord -c /opt/mautrix-discord/config.yaml -r /opt/mautrix-discord/registration.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=mautrix-discord
|
||||
|
||||
# Resource limits
|
||||
MemoryMax=512M
|
||||
CPUQuota=80%
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
PrivateTmp=yes
|
||||
ReadWritePaths=/opt/mautrix-discord /var/log/mautrix-discord
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -19,6 +19,8 @@ Environment=GUARD_BIND_PORT=8070
|
||||
Environment=GUARD_UPSTREAM=http://127.0.0.1:8071
|
||||
Environment=LIVEKIT_API=http://127.0.0.1:7880
|
||||
Environment=SYNAPSE_API=http://127.0.0.1:8008
|
||||
# The voice bridge's bot listens in calls but is not a person (Discord speakers still count).
|
||||
Environment=VOICE_LIMIT_EXEMPT_USERS=@lotus-voice_bot:matrix\\.lotusguild\\.org
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,41 @@
|
||||
# Lotus Guild voice bridge (nether-voicebridge, Lotus-patched build) — LXC 151.
|
||||
# Rendered by voice-bridge/install.sh into /etc/lotus-voice/config.toml (0600).
|
||||
# @AS_TOKEN@ and @PUPPET_TOKENS@ are filled in on the server; never commit them.
|
||||
|
||||
data_dir = "/var/lib/lotus-voice"
|
||||
|
||||
[server.lotus]
|
||||
homeserver_url = "http://127.0.0.1:8008"
|
||||
# MXIDs and .well-known discovery (https://matrix.lotusguild.org) use this domain.
|
||||
matrix_domain = "matrix.lotusguild.org"
|
||||
# Bot = @lotus-voice_bot, Discord speakers = @lotus-voice_<discord id>.
|
||||
sender_localpart = "lotus-voice"
|
||||
appservice_id = "lotus-voice"
|
||||
appservice_token = "@AS_TOKEN@"
|
||||
|
||||
[puppets]
|
||||
# Lotus Voice 1–3 (Discord apps 1565219639640858746 / 1565220427297722378 /
|
||||
# 1565220532830470207). One per Matrix person speaking at the same time.
|
||||
tokens = [@PUPPET_TOKENS@]
|
||||
nickname_prefix = "[Matrix] "
|
||||
|
||||
[[bridge]]
|
||||
name = "discord-voice-bridge"
|
||||
server = "lotus"
|
||||
# Matrix: "Discord Voice Bridge" voice room.
|
||||
room_id = "!yS_ZIHL3sOKQJBt4NiIQyiHKt3cv6HrIDeq7OxDpSM0"
|
||||
[bridge.discord]
|
||||
# Lotus Guild server, voice channel "matrix-bridge".
|
||||
guild_id = "1565159371355197570"
|
||||
channel_id = "1565159372122882071"
|
||||
[bridge.matrix]
|
||||
# Shown as a call participant in encrypted calls (it receives the media keys).
|
||||
bot_display_name = "Discord Voice Bridge"
|
||||
bot_avatar_path = "/opt/lotus-voice/avatar.png"
|
||||
|
||||
# Lotus: leave Discord promptly after the last Matrix person leaves
|
||||
# (upstream defaults 12 s + 90 s). 8 s still covers Element Call's 2-3 s membership flaps.
|
||||
# The bridge logs a "NON-DEFAULT TIMING PROFILE" warning for this; it's expected.
|
||||
[timing]
|
||||
leave_grace_ms = 8000
|
||||
anchor_idle_grace_ms = 10000
|
||||
Executable
+87
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
# One-time install / upgrade of the Lotus voice bridge on LXC 151.
|
||||
# Run on the Proxmox node hosting LXC 151 (and LXC 109 is not needed: the bridge
|
||||
# keeps its state in sqlite under /var/lib/lotus-voice):
|
||||
#
|
||||
# bash install.sh <path to lotus-voice-bridge binary> <secrets file>
|
||||
#
|
||||
# The secrets file holds the three Lotus Voice bot tokens as BOT1=…, BOT2=…, BOT3=…
|
||||
# (shell syntax); it is copied in, used to render the config, then deleted.
|
||||
# Needs this repo's main pulled to /opt/matrix-config on LXC 151 (auto-deploy).
|
||||
# First install restarts Synapse once (new appservice registration). Re-running
|
||||
# with only a new binary just swaps it and restarts the bridge. Safe to re-run.
|
||||
set -euo pipefail
|
||||
|
||||
BIN=${1:?usage: install.sh <binary> <secrets file>}
|
||||
SECRETS=${2:?usage: install.sh <binary> <secrets file>}
|
||||
CT=151
|
||||
[ -x "$BIN" ] || { echo "binary not found/executable: $BIN" >&2; exit 1; }
|
||||
|
||||
echo "== [1/4] copy binary + secrets into LXC $CT"
|
||||
pct push "$CT" "$BIN" /root/lotus-voice-bridge.new --perms 0755
|
||||
pct push "$CT" "$SECRETS" /root/lotus-voice.secrets --perms 0600
|
||||
|
||||
echo "== [2/4] install files, user, config, registration"
|
||||
pct exec "$CT" -- bash -s <<'IN'
|
||||
set -euo pipefail
|
||||
SRC=/opt/matrix-config
|
||||
id lotus-voice >/dev/null 2>&1 || useradd --system --home /var/lib/lotus-voice --shell /usr/sbin/nologin lotus-voice
|
||||
install -d -o lotus-voice -g lotus-voice -m 0750 /var/lib/lotus-voice /etc/lotus-voice
|
||||
install -d -m 0755 /opt/lotus-voice
|
||||
mv /root/lotus-voice-bridge.new /opt/lotus-voice/lotus-voice-bridge
|
||||
install -m 0644 "$SRC/discord-bridge/bot-avatar.png" /opt/lotus-voice/avatar.png
|
||||
|
||||
REG=/etc/matrix-synapse/lotus-voice-registration.yaml
|
||||
if [ ! -f "$REG" ]; then
|
||||
AS=$(openssl rand -hex 32); HS=$(openssl rand -hex 32)
|
||||
sed -e "s/@AS_TOKEN@/$AS/" -e "s/@HS_TOKEN@/$HS/" "$SRC/voice-bridge/registration.yaml.template" > "$REG"
|
||||
chown root:matrix-synapse "$REG"; chmod 0640 "$REG"
|
||||
echo "registration written"
|
||||
fi
|
||||
AS=$(awk '/^as_token:/ {gsub(/"/, "", $2); print $2; exit}' "$REG")
|
||||
|
||||
set -a; . /root/lotus-voice.secrets; set +a
|
||||
rm -f /root/lotus-voice.secrets
|
||||
for v in BOT1 BOT2 BOT3; do [ -n "${!v:-}" ] || { echo "secrets file is missing $v" >&2; exit 1; }; done
|
||||
TOKENS="\"$BOT1\", \"$BOT2\", \"$BOT3\""
|
||||
umask 077
|
||||
sed -e "s/@AS_TOKEN@/$AS/" -e "s|@PUPPET_TOKENS@|$TOKENS|" "$SRC/voice-bridge/config.toml.template" > /etc/lotus-voice/config.toml
|
||||
unset BOT1 BOT2 BOT3 TOKENS
|
||||
chown lotus-voice:lotus-voice /etc/lotus-voice/config.toml
|
||||
install -m 0644 "$SRC/systemd/lotus-voice-bridge.service" /etc/systemd/system/lotus-voice-bridge.service
|
||||
systemctl daemon-reload
|
||||
echo "files ok"
|
||||
IN
|
||||
|
||||
echo "== [3/4] register with Synapse (restart only if newly added)"
|
||||
pct exec "$CT" -- bash -s <<'RS'
|
||||
set -euo pipefail
|
||||
HSY=/etc/matrix-synapse/homeserver.yaml
|
||||
if grep -q lotus-voice-registration.yaml "$HSY"; then
|
||||
echo "already registered — no Synapse restart"
|
||||
else
|
||||
cp "$HSY" "$HSY.bak-$(date +%Y%m%d%H%M%S)-voicebridge"
|
||||
sed -i '/^ - \/etc\/matrix-synapse\/discord-registration.yaml/a \ - /etc/matrix-synapse/lotus-voice-registration.yaml' "$HSY"
|
||||
grep -A4 '^app_service_config_files' "$HSY"
|
||||
systemctl restart matrix-synapse
|
||||
for i in $(seq 1 60); do curl -fsS -o /dev/null http://127.0.0.1:8008/health && break; sleep 2; done
|
||||
curl -fsS http://127.0.0.1:8008/health && echo " (synapse healthy)"
|
||||
fi
|
||||
# Create the bot account now so it can be invited before the bridge first starts.
|
||||
AS=$(awk '/^as_token:/ {gsub(/"/, "", $2); print $2; exit}' /etc/matrix-synapse/lotus-voice-registration.yaml)
|
||||
curl -sS -X POST -H "Authorization: Bearer $AS" -H 'Content-Type: application/json' \
|
||||
-d '{"type":"m.login.application_service","username":"lotus-voice_bot","inhibit_login":true}' \
|
||||
http://127.0.0.1:8008/_matrix/client/v3/register | grep -qE 'user_id|M_USER_IN_USE' && echo "bot account @lotus-voice_bot ready"
|
||||
RS
|
||||
|
||||
echo "== [4/4] (re)start the bridge"
|
||||
pct exec "$CT" -- bash -s <<'ST'
|
||||
set -euo pipefail
|
||||
systemctl enable lotus-voice-bridge >/dev/null 2>&1
|
||||
systemctl restart lotus-voice-bridge
|
||||
sleep 8
|
||||
systemctl --no-pager --lines=0 status lotus-voice-bridge | head -5
|
||||
journalctl -u lotus-voice-bridge --since "-15 sec" --no-pager -o cat | grep -E "puppet connected|initial call snapshot|LiveKit focus|bridge failed|ERROR" | sed -E 's/\x1b\[[0-9;]*m//g' | cut -c1-160 | head -10
|
||||
ST
|
||||
echo
|
||||
echo "Done. In Lotus, invite @lotus-voice_bot:matrix.lotusguild.org to the Discord Voice Bridge room."
|
||||
@@ -0,0 +1,15 @@
|
||||
# Synapse appservice registration for the voice bridge. Rendered by install.sh to
|
||||
# /etc/matrix-synapse/lotus-voice-registration.yaml with fresh random tokens.
|
||||
# The bridge talks to Synapse only as a client (as_token + ?user_id=), so no URL.
|
||||
id: lotus-voice
|
||||
url: null
|
||||
as_token: "@AS_TOKEN@"
|
||||
hs_token: "@HS_TOKEN@"
|
||||
sender_localpart: lotus-voice_as
|
||||
namespaces:
|
||||
users:
|
||||
- exclusive: true
|
||||
regex: "@lotus-voice_.*:matrix\\.lotusguild\\.org"
|
||||
aliases: []
|
||||
rooms: []
|
||||
rate_limited: false
|
||||
Reference in new issue
Block a user