# HG changeset patch # User Paul Aurich # Date 1247784997 0 # Node ID 043b5d24973299323927e6214d3bd971b9f853ee # Parent 9c591a669ffe0f4ea1917628203a44ca3950915e The item JID will match the 'to' JID, not the from. Also, only try to be clever when the item JID is set. diff -r 9c591a669ffe -r 043b5d249732 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Thu Jul 16 22:53:37 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Thu Jul 16 22:56:37 2009 +0000 @@ -805,6 +805,7 @@ const char *nick; const char *code = NULL; const char *item_jid = NULL; + const char *to; xmlnode *stat; xmlnode *item; @@ -812,7 +813,6 @@ if (item) item_jid = xmlnode_get_attrib(item, "jid"); - stat = xmlnode_get_child(x, "status"); if (stat) @@ -889,7 +889,8 @@ * Also possibly works around bits of an Openfire bug. See * #8319. */ - if (is_our_resource && !purple_strequal(from, item_jid)) { + to = xmlnode_get_attrib(packet, "to"); + if (is_our_resource && item_jid && !purple_strequal(to, item_jid)) { /* TODO: When the above is a loop, this needs to still act * sanely for all cases (this code is a little fragile). */ if (!kick && !nick_change)