Mercurial > pidgin
diff libpurple/protocols/mxit/profile.c @ 31628:08dccf527457
Adding contacts normally and via search-results works slightly differently
in MXit. The 'Invite' button on the search-results window pops-up the standard
"Add Buddy" window, and so the prpl doesn't know what type of invite to
perform.
To get around this problem for now, we'll encode this in the search-results
userId and the prpl can detect this and perform the right type of invite.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 03 May 2011 20:29:59 +0000 |
parents | 6b59dd656fee |
children | bb4eaf8e70d6 |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/profile.c Mon May 02 11:00:39 2011 +0000 +++ b/libpurple/protocols/mxit/profile.c Tue May 03 20:29:59 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 */