summaryrefslogtreecommitdiff
path: root/telepathy-glib/connection.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-20 17:49:57 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-01 13:05:05 +0100
commit70df467659e59c11a54245a57dba50eb53f6a8e5 (patch)
tree0cc5c8369b137e0d3d5ad11bbe143d9602d8afdb /telepathy-glib/connection.c
parent293c43f3c7d9359d7c03a150dbc348fbeaf14ca6 (diff)
downloadtelepathy-glib-70df467659e59c11a54245a57dba50eb53f6a8e5.tar.gz
Automatically prepare TP_CONTACT_FEATURE_CONTACT_BLOCKING when possible
Once TP_CONNECTION_FEATURE_CONTACT_BLOCKING has been prepared we can easily prepare TP_CONTACT_FEATURE_CONTACT_BLOCKING on all contacts as we have all the information needed. Extra contact feature for free! https://bugs.freedesktop.org/show_bug.cgi?id=41801
Diffstat (limited to 'telepathy-glib/connection.c')
-rw-r--r--telepathy-glib/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index aed21ea14..97011642f 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -3146,6 +3146,12 @@ _tp_connection_add_contact (TpConnection *self,
g_hash_table_insert (self->priv->contacts, GUINT_TO_POINTER (handle),
contact);
+
+ /* Set TP_CONTACT_FEATURE_CONTACT_BLOCKING if possible */
+ if (tp_proxy_is_prepared (self, TP_CONNECTION_FEATURE_CONTACT_BLOCKING))
+ {
+ _tp_connection_set_contact_blocked (self, contact);
+ }
}