changeset 28672:7e2e95508a3a

Do not create a conversation yet. A plugin can stop a conversation from being created by intercepting the receiving-*-msg signals. But this code would always open a conversation if a '/buzz' is received as the first message. So we end up with an empty conversation window that we didn't create, and it's confusing as poop! Interestingly, I noticed this because the clang-analyzer cried about it. So yay clang-analyzer!
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 28 Sep 2009 17:39:33 +0000
parents b5a8d5b6608e
children dfabdc9cce88
files libpurple/protocols/yahoo/libymsg.c
diffstat 1 files changed, 0 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Sat Sep 26 18:05:44 2009 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Mon Sep 28 17:39:33 2009 +0000
@@ -1025,7 +1025,6 @@
 		char *m, *m2;
 		char *msn_from = NULL;
 		const char *from;
-		PurpleConversation *c;
 		im = l->data;
 
 		if (!im->from || !im->msg) {
@@ -1077,14 +1076,9 @@
 			from = im->from;
 		}
 
-		c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, from, account);
-
 		if (!strcmp(m, "<ding>")) {
 			char *username;
 
-			if (c == NULL) {
-				c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, from);
-			}
 			username = g_markup_escape_text(from, -1);
 			purple_prpl_got_attention(gc, username, YAHOO_BUZZ);
 			g_free(username);