# HG changeset patch # User Sadrul Habib Chowdhury # Date 1254844603 0 # Node ID 43200ff042ad681eda8d8d07ee6cf8173721dae2 # Parent f7d7cf32a7150aa421e5a61ecbc8ea35f5641f5c Fix sending /buzz on yahoo. Yahoo buzzes are '' sent as normal IMs. 'ding' is an unknown tag, and we were stripping unknown tags. So instead, send the tags we don't recognize as they are without stripping/changing them. ... or perhaps we could treat 'ding' as a known tag instead? Added test cases. diff -r f7d7cf32a715 -r 43200ff042ad ChangeLog --- a/ChangeLog Sun Oct 04 18:01:35 2009 +0000 +++ b/ChangeLog Tue Oct 06 15:56:43 2009 +0000 @@ -7,6 +7,9 @@ is specified. * Fix a crash when adding a buddy without an '@'. + Yahoo: + * Fix sending /buzz. + General: * New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins') to announce the list of loaded plugins (in both Finch and Pidgin). diff -r f7d7cf32a715 -r 43200ff042ad libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Sun Oct 04 18:01:35 2009 +0000 +++ b/libpurple/protocols/yahoo/util.c Tue Oct 06 15:56:43 2009 +0000 @@ -881,6 +881,9 @@ } g_free(etag); } + } else { + /* We don't know what the tag is. Send it unmodified. */ + g_string_append(dest, tag); } i = j; diff -r f7d7cf32a715 -r 43200ff042ad libpurple/tests/test_yahoo_util.c --- a/libpurple/tests/test_yahoo_util.c Sun Oct 04 18:01:35 2009 +0000 +++ b/libpurple/tests/test_yahoo_util.c Tue Oct 06 15:56:43 2009 +0000 @@ -180,6 +180,12 @@ assert_string_equal_free("\x1B[1mbold \x1B[#FF0000mred larger \x1B[#000000mbacktoblack normalsize\x1B[#FF0000m\x1B[#000000m\x1B[x1m", yahoo_html_to_codes("bold red larger backtoblack normalsize")); + + /* buzz/unknown tags */ + assert_string_equal_free("", + yahoo_html_to_codes("")); + assert_string_equal_free("Unknown ", + yahoo_html_to_codes("Unknown ")); } END_TEST