pidgin.mxit: 6e2fcb3f: Protocol 6.3 change to SubscribeContact ...

andrew.victor at mxit.com andrew.victor at mxit.com
Tue Apr 12 17:35:54 EDT 2011


----------------------------------------------------------------------
Revision: 6e2fcb3fcbe56805090c6484c498402536a49440
Parent:   0ab626b19fd6680f39970744d8d60db736c776bf
Author:   andrew.victor at mxit.com
Date:     04/12/11 15:55:13
Branch:   im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/6e2fcb3fcbe56805090c6484c498402536a49440

Changelog: 

Protocol 6.3 change to SubscribeContact packet.


Changes against parent 0ab626b19fd6680f39970744d8d60db736c776bf

  patched  libpurple/protocols/mxit/mxit.c
  patched  libpurple/protocols/mxit/protocol.c
  patched  libpurple/protocols/mxit/protocol.h
  patched  libpurple/protocols/mxit/roster.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/mxit.c	55d1524e0f39f9e4e0a7104a01d4f414b8fafaf8
+++ libpurple/protocols/mxit/mxit.c	b660deeda7df58796113402de0bcf3d4465d11c2
@@ -626,7 +626,7 @@ static void mxit_reinvite( PurpleBlistNo
 		return;
 
 	/* send a new invite */
-	mxit_send_invite( session, contact->username, contact->alias, contact->groupname, NULL );
+	mxit_send_invite( session, contact->username, TRUE, contact->alias, contact->groupname, NULL );
 }
 
 
============================================================
--- libpurple/protocols/mxit/protocol.c	8f08bb32bf9ba013f369656ccf24a9a739e2addf
+++ libpurple/protocols/mxit/protocol.c	09f584d136ff1c767eec1a70c2bc7e8b84556483
@@ -990,20 +990,23 @@ void mxit_send_mood( struct MXitSession*
  *
  *  @param session		The MXit session object
  *  @param username		The username of the contact being invited
+ *  @param mxitid		Indicates the username is a MXitId.
  *  @param alias		Our alias for the contact
  *  @param groupname	Group in which contact should be stored.
  *  @param message		Invite message
  */
-void mxit_send_invite( struct MXitSession* session, const char* username, const char* alias, const char* groupname, const char* message )
+void mxit_send_invite( struct MXitSession* session, const char* username, gboolean mxitid, const char* alias, const char* groupname, const char* message )
 {
 	char		data[CP_MAX_PACKET];
 	int			datalen;
 
 	/* convert the packet to a byte stream */
 	datalen = snprintf( data, sizeof( data ),
-								"ms=%s%c%s%c%s%c%i%c%s",	/* "ms"=group\1username\1alias\1type\1msg */
+								"ms=%s%c%s%c%s%c%i%c%s%c%i",	/* "ms"=group \1 username \1 alias \1 type \1 msg \1 isuserid */
 								groupname, CP_FLD_TERM, username, CP_FLD_TERM, alias,
-								CP_FLD_TERM, MXIT_TYPE_MXIT, CP_FLD_TERM, ( message ? message : "" )
+								CP_FLD_TERM, MXIT_TYPE_MXIT, CP_FLD_TERM,
+								( message ? message : "" ), CP_FLD_TERM,
+								( mxitid ? 0 : 1 )
 	);
 
 	/* queue packet for transmission */
============================================================
--- libpurple/protocols/mxit/protocol.h	2eb1d3ce0e2ef0c0c28b55c0ce88e38bd1719634
+++ libpurple/protocols/mxit/protocol.h	2858d6d6e89f531b88d14e7b43cdcc06455853d9
@@ -309,7 +309,7 @@ void mxit_send_suggest_search( struct MX
 void mxit_send_suggest_friends( struct MXitSession* session, int max, unsigned int nr_attrib, const char* attribute[] );
 void mxit_send_suggest_search( struct MXitSession* session, int max, const char* text, unsigned int nr_attrib, const char* attribute[] );
 
-void mxit_send_invite( struct MXitSession* session, const char* username, const char* alias, const char* groupname, const char* message );
+void mxit_send_invite( struct MXitSession* session, const char* username, gboolean mxitid, const char* alias, const char* groupname, const char* message );
 void mxit_send_remove( struct MXitSession* session, const char* username );
 void mxit_send_allow_sub( struct MXitSession* session, const char* username, const char* alias );
 void mxit_send_deny_sub( struct MXitSession* session, const char* username );
============================================================
--- libpurple/protocols/mxit/roster.c	0558303b48156ddfbf0da3555c90aaf441861c42
+++ libpurple/protocols/mxit/roster.c	d9aff1113dab9ba4dfa976f0da0814d0fb97b1b2
@@ -747,7 +747,7 @@ void mxit_add_buddy( PurpleConnection* g
 		 * you accept an invite.  so in that case the user is already
 		 * in our blist and ready to be chatted to.
 		 */
-		mxit_send_invite( session, buddy_name, buddy_alias, group_name, message );
+		mxit_send_invite( session, buddy_name, TRUE, buddy_alias, group_name, message );
 	}
 	else {
 		purple_debug_info( MXIT_PLUGIN_ID, "mxit_add_buddy (scenario 2) (list:%i)\n", g_slist_length( list ) );


More information about the Commits mailing list