diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 5880ffb8..4eb2e713 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" }