diff --git a/.env.sample b/.env.sample index a29488f..f5ff815 100644 --- a/.env.sample +++ b/.env.sample @@ -15,6 +15,9 @@ COMPOSE_FILE="compose.yml" #DISABLE_FEDERATION=1 +#AUTO_JOIN_ROOM_ENABLED=1 +#AUTO_JOIN_ROOM="#example:example.com" + #COMPOSE_FILE="compose.yml:compose.keycloak.yml" #KEYCLOAK_ENABLED=1 #KEYCLOAK_NAME= diff --git a/compose.yml b/compose.yml index 32559ca..bfa1fa9 100644 --- a/compose.yml +++ b/compose.yml @@ -12,6 +12,8 @@ services: - macaroon_secret_key - form_secret environment: + - AUTO_JOIN_ROOM + - AUTO_JOIN_ROOM_ENABLED - DISABLE_FEDERATION - DOMAIN - LETSENCRYPT_HOST=${DOMAIN} diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index 18cbc27..ea02086 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -1299,8 +1299,10 @@ account_threepid_delegates: # If the room already exists, make certain it is a publicly joinable # room. The join rule of the room must be set to 'public'. # -#auto_join_rooms: -# - "#example:example.com" +{{ if eq (env "AUTO_JOIN_ROOM_ENABLED") "1" }} +auto_join_rooms: + - "{{ env "AUTO_JOIN_ROOM" }}" +{{ end }} # Where auto_join_rooms are specified, setting this flag ensures that the # the rooms exist by creating them when the first user on the