# HG changeset patch # User Paul Aurich # Date 1250965784 0 # Node ID faf98a4b27d807abf6cff8435333fb6c2dc9fb51 # Parent f6cdf5f72479ec992124d45805e558866840cd5e jabber: Fix typing notifications between 2.6.0 and <= 2.5.9. If the Pidgin 2.6.0 user initiates a conversation, there will be no typing notifications, as Pidgin <2.6.0 *has* entity capabilities but does not advertise the Chat States feature (...ugh...). Closes #9996. This also fixes Adium#12643. diff -r f6cdf5f72479 -r faf98a4b27d8 ChangeLog --- a/ChangeLog Sat Aug 22 06:20:10 2009 +0000 +++ b/ChangeLog Sat Aug 22 18:29:44 2009 +0000 @@ -10,6 +10,7 @@ * Escape status messages that have HTML entities in the Get Info dialog. * Fix connecting to XMPP domains with no SRV records from Pidgin on Windows. + * Fix typing notifications with Pidgin 2.5.9 or earlier. Finch: * Properly detect libpanel on OpenBSD. (Brad Smith) diff -r f6cdf5f72479 -r faf98a4b27d8 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Sat Aug 22 06:20:10 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Sat Aug 22 18:29:44 2009 +0000 @@ -89,8 +89,12 @@ } if(!jm->xhtml && !jm->body) { - if (jbr) - jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; + if (jbr) { + if (jm->chat_state != JM_STATE_NONE) + jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; + else + jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; + } if(JM_STATE_COMPOSING == jm->chat_state) { serv_got_typing(jm->js->gc, from, 0, PURPLE_TYPING); diff -r f6cdf5f72479 -r faf98a4b27d8 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Sat Aug 22 06:20:10 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Sat Aug 22 18:29:44 2009 +0000 @@ -471,10 +471,17 @@ jbr->commands_fetched = TRUE; } +#if 0 + /* + * Versions of libpurple before 2.6.0 didn't advertise this capability, so + * we can't yet use Entity Capabilities to determine whether or not the + * other client supports Entity Capabilities. + */ if (jabber_resource_has_capability(jbr, "http://jabber.org/protocol/chatstates")) jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; else jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; +#endif out: g_free(userdata->from);