diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2012-08-30 11:07:17 +0200 |
---|---|---|
committer | Sjoerd Simons <sjoerd@luon.net> | 2012-08-30 11:28:39 +0200 |
commit | 273cf5ca055378ddb4093a4b5addf039b750832d (patch) | |
tree | 90e5b00ceb2c81e0ee4d6b426a3d370e9339c1e6 | |
parent | b6342b5b39d5f0cd02e2580ddc569d0eeb9e8c72 (diff) |
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.
-rw-r--r-- | 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 5ac5081da..32c17e82e 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); |