diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index 1dda5e7..f041a5d 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -2199,6 +2199,31 @@ i_create_filter(MatrixAPI *api, g_free(path); } +static void +i_download_filter(MatrixAPI *api, + MatrixAPICallback callback, + gpointer user_data, + const gchar *user_id, + const gchar *filter_id, + GError **error) +{ + gchar *encoded_user_id, *encoded_filter_id, *path; + + encoded_user_id = soup_uri_encode(user_id, NULL); + encoded_filter_id = soup_uri_encode(filter_id, NULL); + path = g_strdup_printf("user/%s/filter/%s", + encoded_user_id, encoded_filter_id); + g_free(encoded_user_id); + g_free(encoded_filter_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) { @@ -2263,7 +2288,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) iface->notify_room_typing = i_notify_room_typing; iface->sync = i_sync; iface->create_filter = i_create_filter; - iface->download_filter = NULL; + iface->download_filter = i_download_filter; /* Search */