Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
22928:4fa01df51fec | 22929:25e4a0add118 |
---|---|
272 static void | 272 static void |
273 msn_session_sync_users(MsnSession *session) | 273 msn_session_sync_users(MsnSession *session) |
274 { | 274 { |
275 PurpleBlistNode *gnode, *cnode, *bnode; | 275 PurpleBlistNode *gnode, *cnode, *bnode; |
276 PurpleConnection *gc = purple_account_get_connection(session->account); | 276 PurpleConnection *gc = purple_account_get_connection(session->account); |
277 GList *to_remove = NULL; | |
277 | 278 |
278 g_return_if_fail(gc != NULL); | 279 g_return_if_fail(gc != NULL); |
279 | 280 |
280 /* The core used to use msn_add_buddy to add all buddies before | 281 /* The core used to use msn_add_buddy to add all buddies before |
281 * being logged in. This no longer happens, so we manually iterate | 282 * being logged in. This no longer happens, so we manually iterate |
314 break; | 315 break; |
315 } | 316 } |
316 } | 317 } |
317 } | 318 } |
318 | 319 |
320 /* We don't care if they're in a different group, as long as they're on the | |
321 * list somewhere. If we check for the group, we cause pain, agony and | |
322 * suffering for people who decide to re-arrange their buddy list elsewhere. | |
323 */ | |
319 if (!found) | 324 if (!found) |
320 { | 325 { |
321 /* The user was not on the server list or not in that group | 326 if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { |
322 * on the server list */ | 327 /* The user is not on the server list */ |
323 msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); | 328 msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); |
329 } else { | |
330 /* The user is not in that group on the server list */ | |
331 to_remove = g_list_prepend(to_remove, b); | |
332 } | |
324 } | 333 } |
325 } | 334 } |
326 } | 335 } |
327 } | 336 } |
337 } | |
338 | |
339 if (to_remove != NULL) { | |
340 g_list_foreach(to_remove, (GFunc)purple_blist_remove_buddy, NULL); | |
328 } | 341 } |
329 } | 342 } |
330 | 343 |
331 void | 344 void |
332 msn_session_set_error(MsnSession *session, MsnErrorType error, | 345 msn_session_set_error(MsnSession *session, MsnErrorType error, |