Implement whois

This commit is contained in:
Gergely Polonkai 2016-01-15 18:55:49 +01:00
parent b4e263cdd9
commit 46b5f5d918

View File

@ -2224,6 +2224,27 @@ i_download_filter(MatrixAPI *api,
g_free(path);
}
static void
i_whois(MatrixAPI *api,
MatrixAPICallback callback,
gpointer user_data,
const gchar *user_id,
GError **error)
{
gchar *encoded_user_id, *path;
encoded_user_id = soup_uri_encode(user_id, NULL);
path = g_strdup_printf("admin/whois/%s", encoded_user_id);
g_free(encoded_user_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)
{
@ -2293,7 +2314,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface)
/* Search */
/* Server administration */
iface->whois = NULL;
iface->whois = i_whois;
iface->versions = NULL;
/* Session management */