Add API method for /joined_rooms

This commit is contained in:
2018-02-28 11:12:34 +01:00
parent 723d7c5485
commit d3c6760d27
4 changed files with 40 additions and 0 deletions

View File

@@ -2212,6 +2212,15 @@ whoami(MatrixAPI *api, MatrixAPICallback cb, void *cb_target, GError **error)
NULL, NULL, NULL, NULL, FALSE, error);
}
static void
get_joined_rooms(MatrixAPI *api, MatrixAPICallback cb, void *cb_target, GError **error)
{
_matrix_http_api_send(MATRIX_HTTP_API(api),
cb, cb_target,
CALL_TYPE_API, "GET", "joined_rooms",
NULL, NULL, NULL, NULL, FALSE, error);
}
static void
matrix_http_api_abort_pending (MatrixAPI *matrix_api)
{
@@ -2583,6 +2592,7 @@ matrix_http_api_matrix_api_interface_init(MatrixAPIInterface * iface)
iface->set_token = matrix_http_api_set_token;
iface->get_homeserver = matrix_http_api_get_homeserver;
iface->whoami = whoami;
iface->get_joined_rooms = get_joined_rooms;
}
static void