diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 5880ffb843a94d608bcdc97d8fc9ef5e87aae057..4eb2e713bef2ea5ed16ecadc3c56309c2c8ff4de 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -290,7 +290,11 @@ function add_user_matrix { ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password" - retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a) + if [[ $ONION_ONLY == 'no' ]]; then + retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a https://${DEFAULT_DOMAIN_NAME}:${MATRIX_HTTP_PORT}) + else + retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://${DEFAULT_DOMAIN_NAME}:${MATRIX_HTTP_PORT}) + fi echo "0" }