diff src/protocols/jabber/presence.c @ 7944:a99f0aebc7ce

[gaim-migrate @ 8615] assorted jabber tweaks committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 28 Dec 2003 04:27:27 +0000
parents e87e7d9d0132
children b02b30247e7a
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Sun Dec 28 02:41:52 2003 +0000
+++ b/src/protocols/jabber/presence.c	Sun Dec 28 04:27:27 2003 +0000
@@ -140,6 +140,7 @@
 {
 	const char *from = xmlnode_get_attrib(packet, "from");
 	const char *type = xmlnode_get_attrib(packet, "type");
+	const char *real_jid = NULL;
 	char *status = NULL;
 	int priority = 0;
 	JabberID *jid;
@@ -250,6 +251,9 @@
 								G_CALLBACK(jabber_chat_create_instant_room));
 					}
 				}
+				if((z = xmlnode_get_child(y, "item"))) {
+					real_jid = xmlnode_get_attrib(z, "jid");
+				}
 			}
 		}
 	}
@@ -309,12 +313,12 @@
 				jabber_chat_destroy(chat);
 			} else {
 				gaim_conv_chat_remove_user(GAIM_CONV_CHAT(chat->conv), jid->resource,
-						NULL);
+						real_jid);
 			}
 		} else {
 			if(!jabber_chat_find_buddy(chat->conv, jid->resource))
 				gaim_conv_chat_add_user(GAIM_CONV_CHAT(chat->conv), jid->resource,
-						NULL);
+						real_jid);
 		}
 		g_free(room_jid);
 	} else {