Mercurial > pidgin
comparison libpurple/protocols/msn/msn.c @ 25542:fd5eedf131b4
Generalize the FQY command so it can be used by different callbacks based
on the place that called it. Then automatically call an FQY when sending
the buddy list ADL's for a buddy with an unknown network. Then we can send
a corrected ADL later with the network from the FQY.
This should make it easier for people with OCS/Yahoo contacts that were
added incorrectly by previous versions, as they shouldn't need to mess with
their address book outside of Pidgin (but if there are multiple buddy
copies, that may need fixing externally). I should probably figure out how
to permanently fix the Membership lists, eventually.
References #6755.
References #3322
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 27 Feb 2009 07:13:20 +0000 |
parents | b0c75121cf66 |
children | c384d62009c0 4b8c4870b13a |
comparison
equal
deleted
inserted
replaced
25539:14b927f45ec5 | 25542:fd5eedf131b4 |
---|---|
1464 if ((user != NULL) && (user->networkid != MSN_NETWORK_UNKNOWN)) { | 1464 if ((user != NULL) && (user->networkid != MSN_NETWORK_UNKNOWN)) { |
1465 /* We already know this buddy and their network. This function knows | 1465 /* We already know this buddy and their network. This function knows |
1466 what to do with users already in the list and stuff... */ | 1466 what to do with users already in the list and stuff... */ |
1467 msn_userlist_add_buddy(userlist, who, group ? group->name : NULL); | 1467 msn_userlist_add_buddy(userlist, who, group ? group->name : NULL); |
1468 } else { | 1468 } else { |
1469 char **tokens; | |
1470 char *fqy; | |
1469 /* We need to check the network for this buddy first */ | 1471 /* We need to check the network for this buddy first */ |
1470 msn_userlist_save_pending_buddy(userlist, who, group ? group->name : NULL); | 1472 msn_userlist_save_pending_buddy(userlist, who, group ? group->name : NULL); |
1471 msn_notification_send_fqy(session, who); | 1473 tokens = g_strsplit(who, "@", 2); |
1474 fqy = g_strdup_printf("<ml><d n=\"%s\"><c n=\"%s\"/></d></ml>", | |
1475 tokens[1], | |
1476 tokens[0]); | |
1477 msn_notification_send_fqy(session, fqy, strlen(fqy), | |
1478 (MsnFqyCb)msn_userlist_add_pending_buddy); | |
1479 g_free(fqy); | |
1480 g_strfreev(tokens); | |
1472 } | 1481 } |
1473 } | 1482 } |
1474 | 1483 |
1475 static void | 1484 static void |
1476 msn_rem_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) | 1485 msn_rem_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) |