From 246b99b8ce7b9a4c4df5a0ef63c384a99576496c Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 15 Apr 2020 11:13:36 -0700 Subject: [PATCH] auto join #discuss room --- homeserver.yaml.template | 7 ++++--- start.sh | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/homeserver.yaml.template b/homeserver.yaml.template index 379dcdf..2371312 100644 --- a/homeserver.yaml.template +++ b/homeserver.yaml.template @@ -1,6 +1,7 @@ # https://github.com/matrix-org/synapse/blob/master/docs/sample_config.yaml -server_name: "matrix.example.com" +# if you change this, change the auto_join_rooms below as well +server_name: "example.com" pid_file: /run/synapse/homeserver.pid @@ -97,8 +98,8 @@ max_upload_size: 200M max_image_pixels: "32M" dynamic_thumbnails: false -#auto_join_rooms: -# - "#discuss:example.com" +auto_join_rooms: + - "#discuss:example.com" trusted_key_servers: - server_name: "matrix.org" diff --git a/start.sh b/start.sh index 60aeea5..afd9c3d 100755 --- a/start.sh +++ b/start.sh @@ -28,6 +28,10 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then yq w -i /app/data/configs/homeserver.yaml server_name "${server_name}" yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)" + + yq w -i /app/data/configs/homeserver.yaml auto_join_rooms "[]" + yq w -i /app/data/configs/homeserver.yaml auto_join_rooms\[0\] "#discuss:${server_name}" +y fi echo "==> Configuring synapse"