aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-contact-factory.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-05 18:21:17 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-05 18:21:17 +0800
commit62828fac680bd53e0047d9ae2a281c864075c809 (patch)
treee120b9730c1e89a4c0ca22b2a05d6a97d0e7187a /libempathy/empathy-tp-contact-factory.c
parent8dbbe0d9fdd3ee8f1c30bcea1662d67d4e6aa5d3 (diff)
downloadgsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar.gz
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar.bz2
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar.lz
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar.xz
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.tar.zst
gsoc2013-empathy-62828fac680bd53e0047d9ae2a281c864075c809.zip
If self presence message is "" do like if it was NULL.
svn path=/trunk/; revision=1081
Diffstat (limited to 'libempathy/empathy-tp-contact-factory.c')
-rw-r--r--libempathy/empathy-tp-contact-factory.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index eeb4ece71..e071ff5fb 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -107,14 +107,18 @@ tp_contact_factory_presences_table_foreach (const gchar *state_str,
EmpathyContact *contact)
{
const GValue *message;
+ const gchar *message_str = NULL;
empathy_contact_set_presence (contact,
empathy_presence_from_str (state_str));
message = g_hash_table_lookup (presences_table, "message");
- if (message != NULL) {
- empathy_contact_set_presence_message (contact,
- g_value_get_string (message));
+ if (message) {
+ message_str = g_value_get_string (message);
+ }
+
+ if (!G_STR_EMPTY (message_str)) {
+ empathy_contact_set_presence_message (contact, message_str);
} else {
empathy_contact_set_presence_message (contact, NULL);
}
@@ -139,7 +143,7 @@ tp_contact_factory_parse_presence_foreach (guint handle,
(GHFunc) tp_contact_factory_presences_table_foreach,
contact);
- DEBUG ("Changing presence for contact %s (%d) to %s (%d)",
+ DEBUG ("Changing presence for contact %s (%d) to '%s' (%d)",
empathy_contact_get_id (contact),
handle,
empathy_contact_get_presence_message (contact),