Mercurial > pidgin.yaz
changeset 30333:097569720d68
jabber: Send typing notifications to a buddy when it can see our presence
This allows us to send typing notifications to a resource which we haven't
seen presence from (because there's a product out there that coalesces
presence to bare JID, but exposes resources for messaging, which I think
is stupid). Should Fixes #11819
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 12 May 2010 05:21:19 +0000 |
parents | a40c55113f7d |
children | e63ea24aa291 |
files | libpurple/protocols/jabber/message.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c Wed May 12 04:26:46 2010 +0000 +++ b/libpurple/protocols/jabber/message.c Wed May 12 05:21:19 2010 +0000 @@ -1250,7 +1250,14 @@ g_free(resource); - if (!jbr || (jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED)) + /* We know this entity doesn't support chat states */ + if (jbr && jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED) + return 0; + + /* *If* we don't have presence /and/ the buddy can't see our + * presence, don't send typing notifications. + */ + if (!jbr && !(jb->subscription & JABBER_SUB_FROM)) return 0; /* TODO: figure out threading */