Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/jabber.c @ 26773:803e05b3a871
Retrieve status message to display in Buddy List from PurplePresence.
JabberBuddyResources are not tracked when they go offline, so this would
return NULL if all resources are offline. In either case, the function
returned the status message from the highest priority resource, which is also
the one in the PurplePresence.
Closes #1420.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 26 Apr 2009 03:18:07 +0000 |
parents | 90d5e3b94a37 |
children | bbf174c5d331 09e9b7e50df9 02624b4a7552 4548c114e953 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Sun Apr 26 02:27:08 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Apr 26 03:18:07 2009 +0000 @@ -1701,10 +1701,11 @@ } else if(jb && !PURPLE_BUDDY_IS_ONLINE(b) && jb->error_msg) { ret = g_strdup(jb->error_msg); } else { + PurplePresence *presence = purple_buddy_get_presence(b); + PurpleStatus *status =purple_presence_get_active_status(presence); char *stripped; - if(!(stripped = purple_markup_strip_html(jabber_buddy_get_status_msg(jb)))) { - PurplePresence *presence = purple_buddy_get_presence(b); + if(!(stripped = purple_markup_strip_html(purple_status_get_attr_string(status, "message")))) { if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) { PurpleStatus *status = purple_presence_get_status(presence, "tune"); stripped = g_strdup(purple_status_get_attr_string(status, PURPLE_TUNE_TITLE));