telepathy-glib: Set the ChannelRequests immutable properties when observer channels
Sjoerd Simons
sjoerd at kemper.freedesktop.org
Thu Aug 30 02:31:35 PDT 2012
Module: telepathy-glib
Branch: master
Commit: 273cf5ca055378ddb4093a4b5addf039b750832d
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=273cf5ca055378ddb4093a4b5addf039b750832d
Author: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Date: Thu Aug 30 11:07:17 2012 +0200
Set the ChannelRequests immutable properties when observer channels
When ObserveChannels comes in we are given all the immutable properties
for the statisfied requests straight away, so lets use them as well.
This prevents poor application authors from being confused about their
hints not coming through in their observer.
---
telepathy-glib/base-client.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 5ac5081..32c17e8 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -1768,6 +1768,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
GArray *account_features;
GArray *connection_features;
GArray *channel_features;
+ GHashTable *request_props;
if (!(self->priv->flags & CLIENT_IS_OBSERVER))
{
@@ -1809,13 +1810,19 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
}
requests = g_ptr_array_new_full (requests_arr->len, g_object_unref);
+ request_props = tp_asv_get_boxed (observer_info, "request-properties",
+ TP_HASH_TYPE_OBJECT_IMMUTABLE_PROPERTIES_MAP);
for (i = 0; i < requests_arr->len; i++)
{
const gchar *req_path = g_ptr_array_index (requests_arr, i);
TpChannelRequest *request;
+ GHashTable *props = NULL;
+
+ if (request_props != NULL)
+ props = g_hash_table_lookup (request_props, req_path);
request = _tp_simple_client_factory_ensure_channel_request (
- self->priv->factory, req_path, NULL, &error);
+ self->priv->factory, req_path, props, &error);
if (request == NULL)
{
DEBUG ("Failed to create TpChannelRequest: %s", error->message);
More information about the telepathy-commits
mailing list