comparison libpurple/protocols/mxit/roster.c @ 31937:aa74632c869d

Add the invite message support to MXit prpl.
author andrew.victor@mxit.com
date Mon, 21 Mar 2011 16:30:01 +0000
parents b8d9329dda4a
children 80bbed4cb649
comparison
equal deleted inserted replaced
31858:826b595c4259 31937:aa74632c869d
678 * The user has added a buddy to the list, so send an invite request. 678 * The user has added a buddy to the list, so send an invite request.
679 * 679 *
680 * @param gc The connection object 680 * @param gc The connection object
681 * @param buddy The new buddy 681 * @param buddy The new buddy
682 * @param group The group of the new buddy 682 * @param group The group of the new buddy
683 */ 683 * @param message The invite message
684 void mxit_add_buddy( PurpleConnection* gc, PurpleBuddy* buddy, PurpleGroup* group ) 684 */
685 void mxit_add_buddy( PurpleConnection* gc, PurpleBuddy* buddy, PurpleGroup* group, const char* message )
685 { 686 {
686 struct MXitSession* session = (struct MXitSession*) gc->proto_data; 687 struct MXitSession* session = (struct MXitSession*) gc->proto_data;
687 GSList* list = NULL; 688 GSList* list = NULL;
688 PurpleBuddy* mxbuddy = NULL; 689 PurpleBuddy* mxbuddy = NULL;
689 unsigned int i; 690 unsigned int i;
700 * we only send an invite to MXit when the user is not already inside our 701 * we only send an invite to MXit when the user is not already inside our
701 * blist. this is done because purple does an add_buddy() call when 702 * blist. this is done because purple does an add_buddy() call when
702 * you accept an invite. so in that case the user is already 703 * you accept an invite. so in that case the user is already
703 * in our blist and ready to be chatted to. 704 * in our blist and ready to be chatted to.
704 */ 705 */
705 mxit_send_invite( session, buddy_name, buddy_alias, group_name ); 706 mxit_send_invite( session, buddy_name, buddy_alias, group_name, message );
706 } 707 }
707 else { 708 else {
708 purple_debug_info( MXIT_PLUGIN_ID, "mxit_add_buddy (scenario 2) (list:%i)\n", g_slist_length( list ) ); 709 purple_debug_info( MXIT_PLUGIN_ID, "mxit_add_buddy (scenario 2) (list:%i)\n", g_slist_length( list ) );
709 /* 710 /*
710 * we already have the buddy in our list, so we will only update 711 * we already have the buddy in our list, so we will only update