Mercurial > pidgin
changeset 11392:e8890f996cc1
[gaim-migrate @ 13621]
patch from Zmitrok
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 31 Aug 2005 19:00:27 +0000 |
parents | d3755a7ddd82 |
children | 1e756e251dc3 |
files | COPYRIGHT src/protocols/jabber/chat.c |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Wed Aug 31 18:50:38 2005 +0000 +++ b/COPYRIGHT Wed Aug 31 19:00:27 2005 +0000 @@ -246,4 +246,5 @@ Nickolai Zeldovich Marco Ziech Piotr Zielinski +Zmitrok Jaroen Zwartepoorte
--- a/src/protocols/jabber/chat.c Wed Aug 31 18:50:38 2005 +0000 +++ b/src/protocols/jabber/chat.c Wed Aug 31 19:00:27 2005 +0000 @@ -895,16 +895,19 @@ if(!(chat = jabber_chat_find_by_id(js, id))) return; + /* defaults, in case the conference server doesn't + * support this request */ + chat->xhtml = TRUE; + if((error = xmlnode_get_child(packet, "error"))) { - /* defaults, in case the conference server doesn't - * support this request */ - chat->xhtml = TRUE; return; } if(!(query = xmlnode_get_child(packet, "query"))) return; + chat->xhtml = FALSE; + for(x = xmlnode_get_child(query, "feature"); x; x = xmlnode_get_next_twin(x)) { const char *var = xmlnode_get_attrib(x, "var"); @@ -918,10 +921,15 @@ { JabberIq *iq; xmlnode *query; + char *room_jid; + + room_jid = g_strdup_printf("%s@%s", chat->room, chat->server); iq = jabber_iq_new_query(chat->js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#info"); + xmlnode_set_attrib(iq->node, "to", room_jid); + query = xmlnode_get_child(iq->node, "query"); xmlnode_set_attrib(query, "node", "http://jabber.org/protocol/muc#traffic"); @@ -929,6 +937,8 @@ jabber_iq_set_callback(iq, jabber_chat_disco_traffic_cb, GINT_TO_POINTER(chat->id)); jabber_iq_send(iq); + + g_free(room_jid); }