pidgin.mxit: da4a8683: When setting an Avatar image via the Gal...

andrew.victor at mxit.com andrew.victor at mxit.com
Mon Jul 19 05:56:05 EDT 2010


----------------------------------------------------------------------
Revision: da4a86838b05de19f69faa2e6e036850380a69bc
Parent:   7610ff6a39a92054f6f9d73ecf77ee244d1e41f9
Author:   andrew.victor at mxit.com
Date:     07/19/10 04:56:03
Branch:   im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/da4a86838b05de19f69faa2e6e036850380a69bc

Changelog: 

When setting an Avatar image via the Gallery bot, the MXit server pushes
a Get Extended Profile response to inform the client.  The MXitId field in that
packet happens to be set to the user's MXitid and not empty so the libpurple
plugin assumes it was a request for a buddies profile information so a profile
popup is displayed.

We now check if the MXitId field is empty or if it matches the user's MxitId
(returned in the Login reponse).


Changes against parent 7610ff6a39a92054f6f9d73ecf77ee244d1e41f9

  patched  libpurple/protocols/mxit/protocol.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/protocol.c	11c23dcf4da9ed943c782ac31e139c3958f1ff4c
+++ libpurple/protocols/mxit/protocol.c	900749d44b44a3478743bbd1d6b9dc441b437683
@@ -1592,8 +1592,8 @@ static void mxit_parse_cmd_extprofile( s
 
 	purple_debug_info( MXIT_PLUGIN_ID, "mxit_parse_cmd_extprofile: profile for '%s'\n", mxitId );
 
-	if ( records[0]->fields[0]->len == 0 ) {
-		/* no MXitId provided, so this must be our own profile information */
+	if ( ( records[0]->fields[0]->len == 0 ) || ( session->uid && ( strcmp( session->uid, records[0]->fields[0]->data ) == 0 ) ) ) {
+		/* No UserId or Our UserId provided, so this must be our own profile information */
 		if ( session->profile == NULL )
 			session->profile = g_new0( struct MXitProfile, 1 );
 		profile = session->profile;


More information about the Commits mailing list