pidgin: bd993285: Make the add/remove buddy from list func..

qulogic at pidgin.im qulogic at pidgin.im
Sat Dec 13 22:19:10 EST 2008


-----------------------------------------------------------------
Revision: bd99328511f28be3b349cad4ddacc7b8abb01259
Ancestor: 9a82f68178e1f6dc5aec00804a670d171ffca463
Author: qulogic at pidgin.im
Date: 2008-12-14T03:09:51
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bd99328511f28be3b349cad4ddacc7b8abb01259

Modified files:
        libpurple/protocols/msn/notification.c
        libpurple/protocols/msn/notification.h
        libpurple/protocols/msn/userlist.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c	af412e730a53bffae4b560762b41e93f0a30d399
+++ libpurple/protocols/msn/notification.c	d424eaa0952166e0d7585719989a829c9cdbd970
@@ -1958,7 +1958,7 @@ msn_notification_add_buddy_to_list(MsnNo
 
 void
 msn_notification_add_buddy_to_list(MsnNotification *notification, MsnListId list_id,
-							  const char *who)
+							  MsnUser *user)
 {
 	MsnCmdProc *cmdproc;
 	MsnListOp list_op = 1 << list_id;
@@ -1971,8 +1971,8 @@ msn_notification_add_buddy_to_list(MsnNo
 	adl_node = xmlnode_new("ml");
 	adl_node->child = NULL;
 
-	msn_add_contact_xml(notification->session, adl_node, who, list_op,
-						MSN_NETWORK_PASSPORT);
+	msn_add_contact_xml(notification->session, adl_node, user->passport,
+	                    list_op, user->networkid);
 
 	payload = xmlnode_to_str(adl_node,&payload_len);
 	xmlnode_free(adl_node);
@@ -1984,7 +1984,7 @@ msn_notification_rem_buddy_from_list(Msn
 
 void
 msn_notification_rem_buddy_from_list(MsnNotification *notification, MsnListId list_id,
-						   const char *who)
+						   MsnUser *user)
 {
 	MsnCmdProc *cmdproc;
 	MsnTransaction *trans;
@@ -1998,7 +1998,8 @@ msn_notification_rem_buddy_from_list(Msn
 	rml_node = xmlnode_new("ml");
 	rml_node->child = NULL;
 
-	msn_add_contact_xml(notification->session, rml_node, who, list_op, MSN_NETWORK_PASSPORT);
+	msn_add_contact_xml(notification->session, rml_node, user->passport,
+	                    list_op, user->networkid);
 
 	payload = xmlnode_to_str(rml_node, &payload_len);
 	xmlnode_free(rml_node);
============================================================
--- libpurple/protocols/msn/notification.h	5d6e50dc4245a428c3d77579938abed6d83a1258
+++ libpurple/protocols/msn/notification.h	f5bb9ed4c5bcdceb4de6d8b96b833671b40db1b5
@@ -42,6 +42,7 @@ typedef struct _MsnNotification MsnNotif
 #include "session.h"
 #include "servconn.h"
 #include "cmdproc.h"
+#include "user.h"
 
 struct _MsnNotification
 {
@@ -64,9 +65,9 @@ void msn_notification_add_buddy_to_list(
 void msn_notification_init(void);
 
 void msn_notification_add_buddy_to_list(MsnNotification *notification,
-					MsnListId list_id, const char *who);
+					MsnListId list_id, MsnUser *user);
 void msn_notification_rem_buddy_from_list(MsnNotification *notification,
-					  MsnListId list_id, const char *who);
+					  MsnListId list_id, MsnUser *user);
 
 void msn_notification_send_fqy(MsnSession *session, const char *passport);
 
============================================================
--- libpurple/protocols/msn/userlist.c	aff6480b441c82e9523b85471bd5ceaf88922a2c
+++ libpurple/protocols/msn/userlist.c	ac7810b2d4a83b0d9cb803b08a54c7314fc74c2b
@@ -668,7 +668,7 @@ msn_userlist_rem_buddy_from_list(MsnUser
 
 	msn_user_unset_op(user, list_op);
 
-	msn_notification_rem_buddy_from_list(userlist->session->notification, list_id, who);
+	msn_notification_rem_buddy_from_list(userlist->session->notification, list_id, user);
 }
 
 /*add buddy*/
@@ -829,7 +829,7 @@ msn_userlist_add_buddy_to_list(MsnUserLi
 
 	msn_user_set_op(user, list_op);
 
-	msn_notification_add_buddy_to_list(userlist->session->notification, list_id, who);
+	msn_notification_add_buddy_to_list(userlist->session->notification, list_id, user);
 }
 
 gboolean


More information about the Commits mailing list