# HG changeset patch # User andrew.victor@mxit.com # Date 1302638113 0 # Node ID 2e4ac25df4ba6bc8a73f1b1b7f8aabf221649ca7 # Parent 67c2d695e8d56cc92f2ef6c153359d355b95a1b3 Protocol 6.3 change to SubscribeContact packet. diff -r 67c2d695e8d5 -r 2e4ac25df4ba libpurple/protocols/mxit/mxit.c --- a/libpurple/protocols/mxit/mxit.c Mon Apr 11 22:16:34 2011 +0000 +++ b/libpurple/protocols/mxit/mxit.c Tue Apr 12 19:55:13 2011 +0000 @@ -626,7 +626,7 @@ 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 ); } diff -r 67c2d695e8d5 -r 2e4ac25df4ba libpurple/protocols/mxit/protocol.c --- a/libpurple/protocols/mxit/protocol.c Mon Apr 11 22:16:34 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.c Tue Apr 12 19:55:13 2011 +0000 @@ -990,20 +990,23 @@ * * @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 */ diff -r 67c2d695e8d5 -r 2e4ac25df4ba libpurple/protocols/mxit/protocol.h --- a/libpurple/protocols/mxit/protocol.h Mon Apr 11 22:16:34 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.h Tue Apr 12 19:55:13 2011 +0000 @@ -309,7 +309,7 @@ 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 ); diff -r 67c2d695e8d5 -r 2e4ac25df4ba libpurple/protocols/mxit/roster.c --- a/libpurple/protocols/mxit/roster.c Mon Apr 11 22:16:34 2011 +0000 +++ b/libpurple/protocols/mxit/roster.c Tue Apr 12 19:55:13 2011 +0000 @@ -747,7 +747,7 @@ * 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 ) );