From 41fdcafaa0ad5813cec585216427d527bbe373e1 Mon Sep 17 00:00:00 2001 From: vdietrich Date: Tue, 28 Oct 2025 17:12:33 +0100 Subject: [PATCH] added env to configure several auto_join_rooms --- .env.sample | 2 ++ abra.sh | 2 +- compose.yml | 1 + homeserver.yaml.tmpl | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index b919531..a4e0f4b 100644 --- a/.env.sample +++ b/.env.sample @@ -39,7 +39,9 @@ PASSWORD_LOGIN_ENABLED=true ## Room auto-join #AUTO_JOIN_ROOM_ENABLED=1 +#AUTO_JOIN_ROOM is deprecated, but kept for backward compatibility. Please use only one, and prefer AUTO_JOIN_ROOM_LIST. #AUTO_JOIN_ROOM="#example:example.com" +#AUTO_JOIN_ROOM_LIST="[\"#room1:example.com\",\"#room2:example.com\"]" ## Logging diff --git a/abra.sh b/abra.sh index adfa806..470f137 100644 --- a/abra.sh +++ b/abra.sh @@ -1,6 +1,6 @@ export DISCORD_BRIDGE_YAML_VERSION=v2 export ENTRYPOINT_CONF_VERSION=v3 -export HOMESERVER_YAML_VERSION=v32 +export HOMESERVER_YAML_VERSION=v33 export LOG_CONFIG_VERSION=v2 export SHARED_SECRET_AUTH_VERSION=v2 export SIGNAL_BRIDGE_YAML_VERSION=v6 diff --git a/compose.yml b/compose.yml index 1dfac80..630c87b 100644 --- a/compose.yml +++ b/compose.yml @@ -47,6 +47,7 @@ services: - ALLOWED_LIFETIME_MAX - ALLOW_PUBLIC_ROOMS_FEDERATION - AUTO_JOIN_ROOM + - AUTO_JOIN_ROOM_LIST - AUTO_JOIN_ROOM_ENABLED - DISABLE_FEDERATION - DOMAIN diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index c65a019..0fb7002 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -157,8 +157,15 @@ registration_shared_secret: {{ secret "registration" }} {{ if eq (env "AUTO_JOIN_ROOM_ENABLED") "1" }} # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#auto_join_rooms + +# AUTO_JOIN_ROOM only for backwards compatibility +{{ if (env "AUTO_JOIN_ROOM") }} auto_join_rooms: - "{{ env "AUTO_JOIN_ROOM" }}" +{{ else }} +auto_join_rooms: {{ env "AUTO_JOIN_ROOM_LIST" }} +{{ end }} + {{ end }} # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#session_lifetime -- 2.49.0