comparison libpurple/protocols/mxit/profile.c @ 31500:80bbed4cb649

* extended the profile information shown for pending invites - avatar image - status message - invite image
author pieter.loubser@mxit.com
date Fri, 01 Apr 2011 13:50:10 +0000
parents acd92b7d8511
children efed7d3c5574
comparison
equal deleted inserted replaced
31499:a769e6da0a8e 31500:80bbed4cb649
212 purple_notify_user_info_add_pair( info, _( "Subscription" ), mxit_convert_subtype_to_name( contact->subtype ) ); 212 purple_notify_user_info_add_pair( info, _( "Subscription" ), mxit_convert_subtype_to_name( contact->subtype ) );
213 213
214 /* hidden number */ 214 /* hidden number */
215 purple_notify_user_info_add_pair( info, _( "Hidden Number" ), ( contact->flags & MXIT_CFLAG_HIDDEN ) ? _( "Yes" ) : _( "No" ) ); 215 purple_notify_user_info_add_pair( info, _( "Hidden Number" ), ( contact->flags & MXIT_CFLAG_HIDDEN ) ? _( "Yes" ) : _( "No" ) );
216 } 216 }
217 else {
218 /* this is an invite */
219 contact = get_mxit_invite_contact( session, username );
220 if ( contact ) {
221 /* invite found */
222
223 if ( contact->msg )
224 purple_notify_user_info_add_pair( info, _( "Invite Message" ), contact->msg );
225
226 if ( contact->imgid ) {
227 /* this invite has a avatar */
228 char* img_text;
229 img_text = g_strdup_printf( "<img id='%d'>", contact->imgid );
230 purple_notify_user_info_add_pair( info, _( "Photo" ), img_text );
231 }
232
233 if ( contact->statusMsg )
234 purple_notify_user_info_add_pair( info, _( "Status Message" ), contact->statusMsg );
235 }
236 }
217 237
218 purple_notify_userinfo( session->con, username, info, NULL, NULL ); 238 purple_notify_userinfo( session->con, username, info, NULL, NULL );
219 purple_notify_user_info_destroy( info ); 239 purple_notify_user_info_destroy( info );
220 } 240 }
221 241