diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 01e2164f..c8ab24c3 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -315,6 +315,9 @@ function add_user_matrix { is_admin_user='-a' read_config_param MY_USERNAME + read_config_param ONION_ONLY + read_config_param MATRIX_DOMAIN_NAME + if [[ "$new_username" != "$MY_USERNAME" ]]; then is_admin_user='' fi @@ -322,10 +325,9 @@ function add_user_matrix { ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password" if [[ $ONION_ONLY == 'no' ]]; then - read_config_param MATRIX_DOMAIN_NAME - retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME}) + register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME} else - retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME}) + register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME} fi echo "0" }