Implement get_room_tags

This commit is contained in:
Gergely Polonkai 2016-01-16 15:07:02 +01:00
parent e553e93307
commit 2b97578ab6

View File

@ -2596,6 +2596,31 @@ i_set_account_data(MatrixAPI *api,
g_free(path); g_free(path);
} }
static void
i_get_room_tags(MatrixAPI *api,
MatrixAPICallback callback,
gpointer user_data,
const gchar *user_id,
const gchar *room_id,
GError **error)
{
gchar *encoded_user_id, *encoded_room_id, *path;
encoded_user_id = soup_uri_encode(user_id, NULL);
encoded_room_id = soup_uri_encode(room_id, NULL);
path = g_strdup_printf("user/%s/rooms/%s/tags",
encoded_user_id, encoded_room_id);
g_free(encoded_user_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 static void
matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) matrix_http_api_matrix_api_init(MatrixAPIInterface *iface)
{ {
@ -2683,7 +2708,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface)
iface->set_display_name = i_set_display_name; iface->set_display_name = i_set_display_name;
iface->register_account = i_register_account; iface->register_account = i_register_account;
iface->set_account_data = i_set_account_data; iface->set_account_data = i_set_account_data;
iface->get_room_tags = NULL; iface->get_room_tags = i_get_room_tags;
iface->delete_room_tag = NULL; iface->delete_room_tag = NULL;
iface->add_room_tag = NULL; iface->add_room_tag = NULL;