summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStu Tomlinson <nosnilmot@pidgin.im>2008-05-13 20:43:21 +0000
committerStu Tomlinson <nosnilmot@pidgin.im>2008-05-13 20:43:21 +0000
commit13306505fe437fce6b6bd167f8c9b2e08ffa41a0 (patch)
treed0f4106cd298e473b226dc8b69e26416e74f50b5
parent2cb1c7ee0de38836cfe8d3c8f92109c826fa24eb (diff)
downloadpidgin-13306505fe437fce6b6bd167f8c9b2e08ffa41a0.tar.gz
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
-rw-r--r--ChangeLog3
-rw-r--r--libpurple/protocols/msn/session.c19
-rw-r--r--libpurple/protocols/msnp9/session.c19
3 files changed, 35 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 47deebd7d2..116d86d4cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,9 @@ version 2.x.x:
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 --git a/libpurple/protocols/msn/session.c b/libpurple/protocols/msn/session.c
index e4f6622df9..9c0b73fec3 100644
--- a/libpurple/protocols/msn/session.c
+++ b/libpurple/protocols/msn/session.c
@@ -274,6 +274,7 @@ msn_session_sync_users(MsnSession *session)
{
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 @@ msn_session_sync_users(MsnSession *session)
}
}
+ /* 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 --git a/libpurple/protocols/msnp9/session.c b/libpurple/protocols/msnp9/session.c
index 4ee29d25df..9c079874b4 100644
--- a/libpurple/protocols/msnp9/session.c
+++ b/libpurple/protocols/msnp9/session.c
@@ -223,6 +223,7 @@ msn_session_sync_users(MsnSession *session)
{
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 @@ msn_session_sync_users(MsnSession *session)
}
+ /* 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