changeset 7258:d1974612b994

[gaim-migrate @ 7835] this mostly works (add/remove button is quirky) but is the RightWay(TM) to do things committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 14 Oct 2003 03:46:00 +0000
parents 31abca48a631
children 22b5b81ca7e0
files src/protocols/jabber/message.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/message.c	Tue Oct 14 03:34:55 2003 +0000
+++ b/src/protocols/jabber/message.c	Tue Oct 14 03:46:00 2003 +0000
@@ -63,12 +63,20 @@
 	jb = jabber_buddy_find(jm->js, jm->from, TRUE);
 	jbr = jabber_buddy_find_resource(jb, jabber_get_resource(jm->from));
 
-	if(gaim_find_conversation_with_account(jm->from, jm->js->gc->account))
+	if(gaim_find_conversation_with_account(jm->from, jm->js->gc->account)) {
 		from = g_strdup(jm->from);
-	else if(jid->node)
+	} else  if(jid->node) {
+		GaimConversation *conv;
+
 		from = g_strdup_printf("%s@%s", jid->node, jid->domain);
-	else
+		conv = gaim_find_conversation_with_account(from, jm->js->gc->account);
+		if(conv)
+			gaim_conversation_set_name(conv, jm->from);
+		g_free(from);
+		from = g_strdup(jm->from);
+	} else {
 		from = g_strdup(jid->domain);
+	}
 
 	if(!jm->xhtml && !jm->body) {
 		if(jm->events & JABBER_MESSAGE_EVENT_COMPOSING)