diff options
author | Butch Howard <ext-butch.howard@nokia.com> | 2010-08-12 11:19:18 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-08-12 11:19:18 +0100 |
commit | 56f42300097369d4d79965a5d9b0e6abdbe35f7e (patch) | |
tree | e50d94d5a614bc7dcf32c63ef3a4c562fce1ff2e /telepathy-glib/presence-mixin.c | |
parent | 0621e229d02f3bdb62863dafcd7adbd2262f8194 (diff) | |
download | telepathy-glib-56f42300097369d4d79965a5d9b0e6abdbe35f7e.tar.gz |
fd.o #25019: allow TpPresenceMixin on connections without old-style Presence
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25019
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/presence-mixin.c')
-rw-r--r-- | telepathy-glib/presence-mixin.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c index 1a3ff5df1..4523dfdfb 100644 --- a/telepathy-glib/presence-mixin.c +++ b/telepathy-glib/presence-mixin.c @@ -386,12 +386,16 @@ tp_presence_mixin_emit_presence_update (GObject *obj, DEBUG ("called."); - presence_hash = construct_presence_hash (mixin_cls->statuses, - contact_statuses); - tp_svc_connection_interface_presence_emit_presence_update (obj, - presence_hash); + if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj), + TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE) != NULL) + { + presence_hash = construct_presence_hash (mixin_cls->statuses, + contact_statuses); + tp_svc_connection_interface_presence_emit_presence_update (obj, + presence_hash); - g_hash_table_destroy (presence_hash); + g_hash_table_destroy (presence_hash); + } if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj), TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE) != NULL) |