# HG changeset patch # User Mark Doliner # Date 1252273995 0 # Node ID 3b820f5d7d6a5c7b4f5b5d4840626c9deeb335cb # Parent a0bff269046ae6cc6d80f8d75158d2f02ff25483 If an oscar buddy on our buddy list is away and we have not yet fetched their HTML info, then fallback to using their plaintext status message when fetching the buddies status text. Fixes #9843 diff -r a0bff269046a -r 3b820f5d7d6a libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Sun Sep 06 21:23:53 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Sep 06 21:53:15 2009 +0000 @@ -829,19 +829,25 @@ the "message" attribute of the status contains only the plaintext message. */ if (userinfo) { - if ((userinfo->flags & AIM_FLAG_AWAY)) { - /* Away message? */ - if ((userinfo->flags & AIM_FLAG_AWAY) && (userinfo->away_len > 0) && (userinfo->away != NULL) && (userinfo->away_encoding != NULL)) { - tmp = oscar_encoding_extract(userinfo->away_encoding); - message = oscar_encoding_to_utf8(account, tmp, userinfo->away, - userinfo->away_len); - g_free(tmp); - } + if ((userinfo->flags & AIM_FLAG_AWAY) + && userinfo->away_len > 0 + && userinfo->away != NULL + && userinfo->away_encoding != NULL) + { + /* Away message */ + tmp = oscar_encoding_extract(userinfo->away_encoding); + message = oscar_encoding_to_utf8(account, + tmp, userinfo->away, userinfo->away_len); + g_free(tmp); } else { - /* Available message? */ + /* + * Available message or non-HTML away message (because that's + * all we have right now. + */ if ((userinfo->status != NULL) && userinfo->status[0] != '\0') { - message = oscar_encoding_to_utf8(account, userinfo->status_encoding, - userinfo->status, userinfo->status_len); + message = oscar_encoding_to_utf8(account, + userinfo->status_encoding, userinfo->status, + userinfo->status_len); } #if defined (_WIN32) || defined (__APPLE__) if (userinfo->itmsurl && (userinfo->itmsurl[0] != '\0'))