changeset 7318:02b713a5c7e2

[gaim-migrate @ 7904] don't rename chats when someone privately IMs you from one committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 23 Oct 2003 12:54:08 +0000
parents 9b303dd88cb2
children 5e486deb70b3
files src/protocols/jabber/message.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/message.c	Wed Oct 22 18:23:45 2003 +0000
+++ b/src/protocols/jabber/message.c	Thu Oct 23 12:54:08 2003 +0000
@@ -53,7 +53,7 @@
 }
 
 static GaimConversation *
-find_unnormalized_conv(const char *name, GaimAccount *account)
+find_unnormalized_im(const char *name, GaimAccount *account)
 {
 	GaimConversation *c = NULL;
 	GList *cnv;
@@ -62,7 +62,8 @@
 
 	for(cnv = gaim_get_conversations(); cnv; cnv = cnv->next) {
 		c = (GaimConversation*)cnv->data;
-		if(!gaim_utf8_strcasecmp(name, gaim_conversation_get_name(c)) &&
+		if(gaim_conversation_get_type(c) == GAIM_CONV_IM &&
+				!gaim_utf8_strcasecmp(name, gaim_conversation_get_name(c)) &&
 				account == gaim_conversation_get_account(c))
 			return c;
 	}
@@ -84,13 +85,13 @@
 	jb = jabber_buddy_find(jm->js, jm->from, TRUE);
 	jbr = jabber_buddy_find_resource(jb, jid->resource);
 
-	if(find_unnormalized_conv(jm->from, jm->js->gc->account)) {
+	if(find_unnormalized_im(jm->from, jm->js->gc->account)) {
 		from = g_strdup(jm->from);
 	} else  if(jid->node) {
 		GaimConversation *conv;
 
 		from = g_strdup_printf("%s@%s", jid->node, jid->domain);
-		conv = find_unnormalized_conv(from, jm->js->gc->account);
+		conv = find_unnormalized_im(from, jm->js->gc->account);
 		if(conv)
 			gaim_conversation_set_name(conv, jm->from);
 		g_free(from);