# HG changeset patch # User Paul Aurich # Date 1247784997 0 # Node ID b448b259e3cf5f6ca51ae4989d1492f1c81c4db7 # Parent caed9d0b1e67c8915952d411a2e88c2097562667 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 caed9d0b1e67 -r b448b259e3cf 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)