Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
7444:66945d35a7c0 | 7445:6ea4a49b4b51 |
---|---|
117 { | 117 { |
118 xmlnode *query, *item, *group; | 118 xmlnode *query, *item, *group; |
119 const char *from = xmlnode_get_attrib(packet, "from"); | 119 const char *from = xmlnode_get_attrib(packet, "from"); |
120 | 120 |
121 if(from) { | 121 if(from) { |
122 char *me, *from_norm; | 122 char *from_norm; |
123 JabberID *from_jid = jabber_id_new(from); | |
124 gboolean invalid; | 123 gboolean invalid; |
125 | 124 |
126 if(!from_jid) | 125 from_norm = g_strdup(jabber_normalize(js->gc->account, from)); |
126 | |
127 if(!from_norm) | |
127 return; | 128 return; |
128 | 129 |
129 from_norm = g_strdup_printf("%s@%s%s%s", | 130 invalid = g_utf8_collate(from_norm, |
130 from_jid->node ? from_jid->node : "", | 131 jabber_normalize(js->gc->account, |
131 from_jid->domain, | 132 gaim_account_get_username(js->gc->account))); |
132 from_jid->resource ? "/" : "", | 133 |
133 from_jid->resource ? from_jid->resource : ""); | |
134 | |
135 if(from_jid->resource) | |
136 me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain, | |
137 js->user->resource); | |
138 else | |
139 me = g_strdup_printf("%s@%s", js->user->node, js->user->domain); | |
140 | |
141 invalid = g_utf8_collate(from_norm, me); | |
142 g_free(from_norm); | 134 g_free(from_norm); |
143 g_free(me); | |
144 jabber_id_free(from_jid); | |
145 | 135 |
146 if(invalid) | 136 if(invalid) |
147 return; | 137 return; |
148 } | 138 } |
149 | 139 |