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)