# HG changeset patch # User Nathan Walp # Date 1066913648 0 # Node ID 02b713a5c7e2873a574b8b0ec95a77b1cbfbe66e # Parent 9b303dd88cb24c73217fcf1047c507612f9b61ed [gaim-migrate @ 7904] don't rename chats when someone privately IMs you from one committer: Tailor Script diff -r 9b303dd88cb2 -r 02b713a5c7e2 src/protocols/jabber/message.c --- 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);