diff src/away.c @ 4476:62c1e5e656d0

[gaim-migrate @ 4751] gaim_conversation_new() now takes an aim_user parameter. This should fix the new placement grouping bugs, as the default "user" (account) selected was the first account in the list of connections. There may be side-effects, especially with perl plugins, but I'm not sure. Please report anything odd that you see as a result of this. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 30 Jan 2003 18:45:50 +0000
parents 8067614e49e4
children 3196d9044a45
line wrap: on
line diff
--- a/src/away.c	Thu Jan 30 18:38:34 2003 +0000
+++ b/src/away.c	Thu Jan 30 18:45:50 2003 +0000
@@ -72,13 +72,17 @@
 		struct queued_message *qm = templist->data;
 		if (templist->data) {
 			if (!g_strcasecmp(qm->name, name)) {
+				struct aim_user *user = NULL;
+
+				if (g_slist_index(connections, qm->gc) >= 0)
+					user = qm->gc->user;
+
 				cnv = gaim_find_conversation(name);
 
 				if (!cnv)
-					cnv = gaim_conversation_new(GAIM_CONV_IM, qm->name);
-
-				if (g_slist_index(connections, qm->gc) >= 0)
-					gaim_conversation_set_user(cnv, qm->gc->user);
+					cnv = gaim_conversation_new(GAIM_CONV_IM, user, qm->name);
+				else
+					gaim_conversation_set_user(cnv, user);
 
 				gaim_im_write(GAIM_IM(cnv), NULL, qm->message, qm->len,
 						qm->flags, qm->tm);
@@ -103,17 +107,22 @@
 	GSList *q = *queue;
 	struct queued_message *qm;
 	struct gaim_conversation *cnv;
+	struct aim_user *user;
 
 	while (q) {
 		qm = q->data;
 
+		user = NULL;
+
+		if (g_slist_index(connections, qm->gc) >= 0)
+			user = qm->gc->user;
+
 		cnv = gaim_find_conversation(qm->name);
 
 		if (!cnv)
-			cnv = gaim_conversation_new(GAIM_CONV_IM, qm->name);
-
-		if (g_slist_index(connections, qm->gc) >= 0)
-			gaim_conversation_set_user(cnv, qm->gc->user);
+			cnv = gaim_conversation_new(GAIM_CONV_IM, user, qm->name);
+		else
+			gaim_conversation_set_user(cnv, user);
 
 		gaim_im_write(GAIM_IM(cnv), NULL, qm->message, -1, qm->flags, qm->tm);