Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/notification.c @ 24671:d6de4f9de12d
Make the add/remove buddy from list functions take a MsnUser* instead of the
email address so that ADL & RML can use the network ID the way I intended.
References #3322.
References #6755.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 14 Dec 2008 03:09:51 +0000 |
parents | 4fd22591e3f0 |
children | f5188d4d84e3 |
comparison
equal
deleted
inserted
replaced
24670:5ec72dbdd28e | 24671:d6de4f9de12d |
---|---|
1956 g_hash_table_destroy(table); | 1956 g_hash_table_destroy(table); |
1957 } | 1957 } |
1958 | 1958 |
1959 void | 1959 void |
1960 msn_notification_add_buddy_to_list(MsnNotification *notification, MsnListId list_id, | 1960 msn_notification_add_buddy_to_list(MsnNotification *notification, MsnListId list_id, |
1961 const char *who) | 1961 MsnUser *user) |
1962 { | 1962 { |
1963 MsnCmdProc *cmdproc; | 1963 MsnCmdProc *cmdproc; |
1964 MsnListOp list_op = 1 << list_id; | 1964 MsnListOp list_op = 1 << list_id; |
1965 xmlnode *adl_node; | 1965 xmlnode *adl_node; |
1966 char *payload; | 1966 char *payload; |
1969 cmdproc = notification->servconn->cmdproc; | 1969 cmdproc = notification->servconn->cmdproc; |
1970 | 1970 |
1971 adl_node = xmlnode_new("ml"); | 1971 adl_node = xmlnode_new("ml"); |
1972 adl_node->child = NULL; | 1972 adl_node->child = NULL; |
1973 | 1973 |
1974 msn_add_contact_xml(notification->session, adl_node, who, list_op, | 1974 msn_add_contact_xml(notification->session, adl_node, user->passport, |
1975 MSN_NETWORK_PASSPORT); | 1975 list_op, user->networkid); |
1976 | 1976 |
1977 payload = xmlnode_to_str(adl_node,&payload_len); | 1977 payload = xmlnode_to_str(adl_node,&payload_len); |
1978 xmlnode_free(adl_node); | 1978 xmlnode_free(adl_node); |
1979 | 1979 |
1980 msn_notification_post_adl(notification->servconn->cmdproc, | 1980 msn_notification_post_adl(notification->servconn->cmdproc, |
1982 g_free(payload); | 1982 g_free(payload); |
1983 } | 1983 } |
1984 | 1984 |
1985 void | 1985 void |
1986 msn_notification_rem_buddy_from_list(MsnNotification *notification, MsnListId list_id, | 1986 msn_notification_rem_buddy_from_list(MsnNotification *notification, MsnListId list_id, |
1987 const char *who) | 1987 MsnUser *user) |
1988 { | 1988 { |
1989 MsnCmdProc *cmdproc; | 1989 MsnCmdProc *cmdproc; |
1990 MsnTransaction *trans; | 1990 MsnTransaction *trans; |
1991 MsnListOp list_op = 1 << list_id; | 1991 MsnListOp list_op = 1 << list_id; |
1992 xmlnode *rml_node; | 1992 xmlnode *rml_node; |
1996 cmdproc = notification->servconn->cmdproc; | 1996 cmdproc = notification->servconn->cmdproc; |
1997 | 1997 |
1998 rml_node = xmlnode_new("ml"); | 1998 rml_node = xmlnode_new("ml"); |
1999 rml_node->child = NULL; | 1999 rml_node->child = NULL; |
2000 | 2000 |
2001 msn_add_contact_xml(notification->session, rml_node, who, list_op, MSN_NETWORK_PASSPORT); | 2001 msn_add_contact_xml(notification->session, rml_node, user->passport, |
2002 list_op, user->networkid); | |
2002 | 2003 |
2003 payload = xmlnode_to_str(rml_node, &payload_len); | 2004 payload = xmlnode_to_str(rml_node, &payload_len); |
2004 xmlnode_free(rml_node); | 2005 xmlnode_free(rml_node); |
2005 | 2006 |
2006 purple_debug_info("msn", "Send RML with payload:\n%s\n", payload); | 2007 purple_debug_info("msn", "Send RML with payload:\n%s\n", payload); |