diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index bfa635e..d8d1047 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -1818,6 +1818,27 @@ i_get_event_context(MatrixAPI *api, g_free(params); } +static void +i_initial_sync_room(MatrixAPI *api, + MatrixAPICallback callback, + gpointer user_data, + const gchar *room_id, + GError **error) +{ + gchar *encoded_room_id, *path; + + encoded_room_id = soup_uri_encode(room_id, NULL); + path = g_strdup_printf("rooms/%s/initialSync", encoded_room_id); + g_free(encoded_room_id); + + _send(MATRIX_HTTP_API(api), + callback, user_data, + CALL_API, + "GET", path, NULL, NULL, NULL, NULL, + FALSE, error); + g_free(path); +} + static void matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) { @@ -1871,7 +1892,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) iface->get_event = i_get_event; iface->initial_sync = i_initial_sync; iface->get_event_context = i_get_event_context; - iface->initial_sync_room = NULL; + iface->initial_sync_room = i_initial_sync_room; iface->list_room_members = NULL; iface->list_room_messages = NULL; iface->send_event_receipt = NULL;