aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/gossip-contact.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/gossip-contact.c')
-rw-r--r--libempathy/gossip-contact.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libempathy/gossip-contact.c b/libempathy/gossip-contact.c
index 53fe7e182..ba97fa758 100644
--- a/libempathy/gossip-contact.c
+++ b/libempathy/gossip-contact.c
@@ -373,7 +373,7 @@ gossip_contact_get_name (GossipContact *contact)
priv = GET_PRIV (contact);
- if (priv->name == NULL) {
+ if (G_STR_EMPTY (priv->name)) {
return gossip_contact_get_id (contact);
}
@@ -710,7 +710,11 @@ gossip_contact_is_online (GossipContact *contact)
priv = GET_PRIV (contact);
- return (priv->presence != NULL);
+ if (!priv->presence) {
+ return FALSE;
+ }
+
+ return (gossip_presence_get_state (priv->presence) > MC_PRESENCE_OFFLINE);
}
gboolean