diff --git a/src/test-client.c b/src/test-client.c index 5c2bc2d..d87058a 100644 --- a/src/test-client.c +++ b/src/test-client.c @@ -30,6 +30,15 @@ static GOptionEntry entries[] = { {"password", 'p', 0, G_OPTION_ARG_STRING, &password}, }; +static void +create_room_finished(MatrixAPI *api, + JsonNode *content, + gpointer data, + GError *err) +{ + g_printf("Room registered\n"); +} + static void login_finished(MatrixAPI *api, JsonNode *content, gpointer data, GError *err) { @@ -58,6 +67,11 @@ login_finished(MatrixAPI *api, JsonNode *content, gpointer data, GError *err) user_id = json_array_get_string_element(array, 0); g_printf("Logged in as %s\n", user_id); + + matrix_http_api_create_room(api, + create_room_finished, NULL, + "matrix-glib-sdk-test", TRUE, + NULL); } else { g_printf("Login unsuccessful!\n"); } @@ -98,7 +112,7 @@ main(int argc, char *argv[]) /* * [ ] register * [X] login - * [ ] create_room + * [X] create_room * [ ] join_room */ api = matrix_http_api_new(url, NULL);