Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.c @ 25608:b33635aced5c
*** Plucked rev ecd9624a (sadrul@pidgin.im):
Preserve utf-8 status messages when going idle.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 13 May 2009 16:06:23 +0000 |
parents | 2260e5b0ca91 |
children | 9656dbf35fb0 |
comparison
equal
deleted
inserted
replaced
25607:b34d5e9b3d9b | 25608:b33635aced5c |
---|---|
3818 const char *tmp; | 3818 const char *tmp; |
3819 if (status == NULL) | 3819 if (status == NULL) |
3820 status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc))); | 3820 status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc))); |
3821 tmp = purple_status_get_attr_string(status, "message"); | 3821 tmp = purple_status_get_attr_string(status, "message"); |
3822 if (tmp != NULL) { | 3822 if (tmp != NULL) { |
3823 msg = yahoo_string_encode(gc, tmp, NULL); | 3823 gboolean utf8 = TRUE; |
3824 msg = yahoo_string_encode(gc, tmp, &utf8); | |
3824 msg2 = purple_markup_strip_html(msg); | 3825 msg2 = purple_markup_strip_html(msg); |
3826 yahoo_packet_hash_str(pkt, 97, utf8 ? "1" : 0); | |
3825 yahoo_packet_hash_str(pkt, 19, msg2); | 3827 yahoo_packet_hash_str(pkt, 19, msg2); |
3826 } else { | 3828 } else { |
3827 /* get_yahoo_status_from_purple_status() returns YAHOO_STATUS_CUSTOM for | 3829 /* get_yahoo_status_from_purple_status() returns YAHOO_STATUS_CUSTOM for |
3828 * the generic away state (YAHOO_STATUS_TYPE_AWAY) with no message */ | 3830 * the generic away state (YAHOO_STATUS_TYPE_AWAY) with no message */ |
3829 yahoo_packet_hash_str(pkt, 19, _("Away")); | 3831 yahoo_packet_hash_str(pkt, 19, _("Away")); |