Mercurial > pidgin.yaz
changeset 32082:bb4eaf8e70d6
propagate from branch 'im.pidgin.pidgin' (head b4610e0aa7f5df4daa5d4ad90ce8a8d80f46e0fe)
to branch 'im.pidgin.pidgin.mxit' (head 8b579559174d8853ab2218dac2e81e3ba5baead2)
author | andrew.victor@mxit.com |
---|---|
date | Wed, 04 May 2011 07:21:43 +0000 |
parents | 08dccf527457 (diff) 5ec6859bf81a (current diff) |
children | 807860d518a6 |
files | ChangeLog libpurple/protocols/mxit/profile.c |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/profile.c Wed May 04 06:46:04 2011 +0000 +++ b/libpurple/protocols/mxit/profile.c Wed May 04 07:21:43 2011 +0000 @@ -292,9 +292,10 @@ while (entries != NULL) { struct MXitProfile* profile = ( struct MXitProfile *) entries->data; GList* row; + gchar* tmp = purple_base64_encode( (unsigned char *) profile->userid, strlen( profile->userid ) ); /* column values */ - row = g_list_append( NULL, g_strdup( profile->userid ) ); + row = g_list_append( NULL, g_strdup_printf( "#%s", tmp ) ); row = g_list_append( row, g_strdup( profile->nickname ) ); row = g_list_append( row, g_strdup( profile->male ? "Male" : "Female" ) ); row = g_list_append( row, g_strdup_printf( "%i", calculateAge( profile->birthday ) ) ); @@ -302,6 +303,8 @@ purple_notify_searchresults_row_add( results, row ); entries = g_list_next( entries ); + + g_free( tmp ); } /* button */
--- a/libpurple/protocols/mxit/roster.c Wed May 04 06:46:04 2011 +0000 +++ b/libpurple/protocols/mxit/roster.c Wed May 04 07:21:43 2011 +0000 @@ -747,7 +747,14 @@ * 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, TRUE, buddy_alias, group_name, message ); + + if ( buddy_name[0] == '#' ) { + gchar *tmp = (gchar*) purple_base64_decode( buddy_name + 1, NULL ); + mxit_send_invite( session, tmp, FALSE, buddy_alias, group_name, message ); + g_free( tmp ); + } + else + 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 ) );