# HG changeset patch # User Stu Tomlinson # Date 1210711401 0 # Node ID 25e4a0add118d9504ad9e44fef91800770c39a78 # Parent 4fa01df51fecffd6db7a5093f6250b0175e4054a Make MSN buddy list synchronization more forgiving, only ask about buddies who appear to have disappeared completely from the server list instead of those that have simply moved groups. References #945, #1184 diff -r 4fa01df51fec -r 25e4a0add118 ChangeLog --- a/ChangeLog Tue May 13 18:56:11 2008 +0000 +++ b/ChangeLog Tue May 13 20:43:21 2008 +0000 @@ -15,6 +15,9 @@ libnm-glib. Hopefully it's stable now. It will now compile by default if you have D-Bus support and NetworkManager.h. (Elliott Sales de Andrade) + * Make MSN buddy list synchronization more forgiving, only ask about + buddies who appear to have disappeared completely from the server list + instead of those that have simply moved groups. Pidgin: * The typing notification in the conversation history can be disabled or diff -r 4fa01df51fec -r 25e4a0add118 libpurple/protocols/msn/session.c --- a/libpurple/protocols/msn/session.c Tue May 13 18:56:11 2008 +0000 +++ b/libpurple/protocols/msn/session.c Tue May 13 20:43:21 2008 +0000 @@ -274,6 +274,7 @@ { PurpleBlistNode *gnode, *cnode, *bnode; PurpleConnection *gc = purple_account_get_connection(session->account); + GList *to_remove = NULL; g_return_if_fail(gc != NULL); @@ -316,16 +317,28 @@ } } + /* We don't care if they're in a different group, as long as they're on the + * list somewhere. If we check for the group, we cause pain, agony and + * suffering for people who decide to re-arrange their buddy list elsewhere. + */ if (!found) { - /* The user was not on the server list or not in that group - * on the server list */ - msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); + if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { + /* The user is not on the server list */ + msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); + } else { + /* The user is not in that group on the server list */ + to_remove = g_list_prepend(to_remove, b); + } } } } } } + + if (to_remove != NULL) { + g_list_foreach(to_remove, (GFunc)purple_blist_remove_buddy, NULL); + } } void diff -r 4fa01df51fec -r 25e4a0add118 libpurple/protocols/msnp9/session.c --- a/libpurple/protocols/msnp9/session.c Tue May 13 18:56:11 2008 +0000 +++ b/libpurple/protocols/msnp9/session.c Tue May 13 20:43:21 2008 +0000 @@ -223,6 +223,7 @@ { PurpleBlistNode *gnode, *cnode, *bnode; PurpleConnection *gc = purple_account_get_connection(session->account); + GList *to_remove = NULL; g_return_if_fail(gc != NULL); @@ -268,16 +269,28 @@ } + /* We don't care if they're in a different group, as long as they're on the + * list somewhere. If we check for the group, we cause pain, agony and + * suffering for people who decide to re-arrange their buddy list elsewhere. + */ if (!found) { - /* The user was not on the server list or not in that group - * on the server list */ - msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); + if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { + /* The user is not on the server list */ + msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); + } else { + /* The user is not in that group on the server list */ + to_remove = g_list_prepend(to_remove, b); + } } } } } } + + if (to_remove != NULL) { + g_list_foreach(to_remove, (GFunc)purple_blist_remove_buddy, NULL); + } } void