# HG changeset patch # User Evan Schoenberg # Date 1211334354 0 # Node ID e765c7261f88c724ac3cb46ea686d2ab71aa64ab # Parent af577b5a6aacbf1d988d7e60cf61df4b87bb8068 If we receive a "text" child for an error, include it as the message text if the error didn't have its own data section. We might want to use it preferentially over the child's data section, but I'm not sure. This significantly improves error messages received when sending messages over XMPP. diff -r af577b5a6aac -r e765c7261f88 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Wed May 07 09:11:24 2008 +0000 +++ b/libpurple/protocols/jabber/message.c Wed May 21 01:45:54 2008 +0000 @@ -403,6 +403,12 @@ const char *code = xmlnode_get_attrib(child, "code"); char *code_txt = NULL; char *text = xmlnode_get_data(child); + if (!text) { + xmlnode *enclosed_text_node; + + if ((enclosed_text_node = xmlnode_get_child(child, "text"))) + text = xmlnode_get_data(enclosed_text_node); + } if(code) code_txt = g_strdup_printf(_(" (Code %s)"), code);