diff libpurple/protocols/msn/notification.c @ 31469:78dccab9824c

Add the session user to the userlist. This reduces the amount of special-casing needed and corrects the buddy icon if you have yourself on your list. Fixes #12973.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 10 Dec 2010 06:38:17 +0000
parents 007ae2d62ea4
children 7d980d6b40e1
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Fri Dec 10 05:59:21 2010 +0000
+++ b/libpurple/protocols/msn/notification.c	Fri Dec 10 06:38:17 2010 +0000
@@ -1250,10 +1250,7 @@
 	networkid = atoi(cmd->params[2]);
 	friendly = purple_url_decode(cmd->params[3]);
 
-	if (g_str_equal(passport, session->user->passport))
-		user = session->user;
-	else
-		user = msn_userlist_find_user(session->userlist, passport);
+	user = msn_userlist_find_user(session->userlist, passport);
 	if (user == NULL) return;
 
 	if (msn_user_set_friendly_name(user, friendly) && user != session->user)
@@ -1705,10 +1702,7 @@
 	session = cmdproc->session;
 
 	passport = cmd->params[0];
-	if (g_str_equal(passport, session->user->passport))
-		user = session->user;
-	else
-		user = msn_userlist_find_user(session->userlist, passport);
+	user = msn_userlist_find_user(session->userlist, passport);
 	if (user == NULL) {
 		char *str = g_strndup(payload, len);
 		purple_debug_info("msn", "unknown user %s, payload is %s\n",