Mercurial > pidgin
comparison libpurple/protocols/mxit/protocol.c @ 30287:c2b3bfb2fe35
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).
author | andrew.victor@mxit.com |
---|---|
date | Mon, 19 Jul 2010 08:56:03 +0000 |
parents | 08d9cdac2b3c |
children | d9e94339ca3b |
comparison
equal
deleted
inserted
replaced
30286:08d9cdac2b3c | 30287:c2b3bfb2fe35 |
---|---|
1590 int count; | 1590 int count; |
1591 int i; | 1591 int i; |
1592 | 1592 |
1593 purple_debug_info( MXIT_PLUGIN_ID, "mxit_parse_cmd_extprofile: profile for '%s'\n", mxitId ); | 1593 purple_debug_info( MXIT_PLUGIN_ID, "mxit_parse_cmd_extprofile: profile for '%s'\n", mxitId ); |
1594 | 1594 |
1595 if ( records[0]->fields[0]->len == 0 ) { | 1595 if ( ( records[0]->fields[0]->len == 0 ) || ( session->uid && ( strcmp( session->uid, records[0]->fields[0]->data ) == 0 ) ) ) { |
1596 /* no MXitId provided, so this must be our own profile information */ | 1596 /* No UserId or Our UserId provided, so this must be our own profile information */ |
1597 if ( session->profile == NULL ) | 1597 if ( session->profile == NULL ) |
1598 session->profile = g_new0( struct MXitProfile, 1 ); | 1598 session->profile = g_new0( struct MXitProfile, 1 ); |
1599 profile = session->profile; | 1599 profile = session->profile; |
1600 } | 1600 } |
1601 else { | 1601 else { |