diff src/protocols/jabber/roster.c @ 7445:6ea4a49b4b51

[gaim-migrate @ 8052] this should fix the case sensitivity issues for jabber. what made me think that g_utf8_normalize() did anything with the strings of cases is beyond me. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 06 Nov 2003 07:07:22 +0000
parents 85cd2e71bff7
children 126fceb88bec
line wrap: on
line diff
--- a/src/protocols/jabber/roster.c	Thu Nov 06 05:44:28 2003 +0000
+++ b/src/protocols/jabber/roster.c	Thu Nov 06 07:07:22 2003 +0000
@@ -119,29 +119,19 @@
 	const char *from = xmlnode_get_attrib(packet, "from");
 
 	if(from) {
-		char *me, *from_norm;
-		JabberID *from_jid = jabber_id_new(from);
+		char *from_norm;
 		gboolean invalid;
 
-		if(!from_jid)
+		from_norm = g_strdup(jabber_normalize(js->gc->account, from));
+
+		if(!from_norm)
 			return;
 
-		from_norm = g_strdup_printf("%s@%s%s%s",
-				from_jid->node ? from_jid->node : "",
-				from_jid->domain,
-				from_jid->resource ? "/" : "",
-				from_jid->resource ? from_jid->resource : "");
+		invalid = g_utf8_collate(from_norm,
+				jabber_normalize(js->gc->account,
+					gaim_account_get_username(js->gc->account)));
 
-		if(from_jid->resource)
-			me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain,
-					js->user->resource);
-		else
-			me = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
-
-		invalid = g_utf8_collate(from_norm, me);
 		g_free(from_norm);
-		g_free(me);
-		jabber_id_free(from_jid);
 
 		if(invalid)
 			return;