changeset 7175:3a1b5a9b09c8

[gaim-migrate @ 7743] specs are cool. following them is cooler. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 06 Oct 2003 04:26:21 +0000
parents 5d0db846c42d
children 57478df4faf8
files src/protocols/jabber/roster.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/roster.c	Mon Oct 06 04:20:13 2003 +0000
+++ b/src/protocols/jabber/roster.c	Mon Oct 06 04:26:21 2003 +0000
@@ -117,8 +117,19 @@
 {
 	xmlnode *query, *item, *group;
 	const char *from = xmlnode_get_attrib(packet, "from");
-	if(from && strcmp(gaim_account_get_username(js->gc->account), from))
+	char *me1, *me2;
+
+	me1 = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
+	me2 = g_strdup_printf("%s/%s", me1, js->user->resource);
+
+	if(from && strcmp(from, me1) && strcmp(from, me2)) {
+		g_free(me1);
+		g_free(me2);
 		return;
+	}
+
+	g_free(me1);
+	g_free(me2);
 
 	query = xmlnode_get_child(packet, "query");
 	if(!query)