Mercurial > pidgin.yaz
diff libpurple/protocols/msn/session.c @ 22929:25e4a0add118
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
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 13 May 2008 20:43:21 +0000 |
parents | 23fef20a0ef2 |
children | 09cab27cbe42 |
line wrap: on
line diff
--- 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