diff --git a/README.md b/README.md index 8e555b8..98de7c5 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,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) | 127.0.0.1 | +| 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 | @@ -427,8 +427,15 @@ can't overwrite the room's name and icon with the Discord channel's. **Rotating the bot token:** reset it in the Developer Portal, then DM the bridge bot `logout` and `login-token bot `. -**Not set up yet:** `bridge.public_address`, so Matrix users' avatars aren't shown on their relayed -Discord messages (names are). It needs a public NPM route to `/mautrix-discord/avatar/`. +**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. --- diff --git a/discord-bridge/config.yaml b/discord-bridge/config.yaml index 9bc0802..403a4ef 100644 --- a/discord-bridge/config.yaml +++ b/discord-bridge/config.yaml @@ -31,7 +31,7 @@ appservice: address: http://127.0.0.1:29334 # The hostname and port where this appservice should listen. - hostname: 127.0.0.1 + hostname: 0.0.0.0 port: 29334 # Database config. @@ -114,7 +114,7 @@ bridge: # 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: null + 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 @@ -257,7 +257,7 @@ bridge: # With limits, all messages up to the limit are fetched first and backfilled afterwards. missed: dm: 0 - channel: 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.