pidgin.mxit: d665f091: The mini-dialogs feature now allows you ...

andrew.victor at mxit.com andrew.victor at mxit.com
Thu Mar 31 16:20:51 EDT 2011


----------------------------------------------------------------------
Revision: d665f09198c857edfed84fb72b61ff0079ecdea5
Parent:   d64d76f78c4b4d62481cbb30dc5d2be265b5052b
Author:   andrew.victor at mxit.com
Date:     03/31/11 16:15:18
Branch:   im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/d665f09198c857edfed84fb72b61ff0079ecdea5

Changelog: 

The mini-dialogs feature now allows you to request profile information for
pending invites before accepting them.  Since it's an invite there is no
PurpleBuddy associated with the user, and therefore we cannot perform the
contact-type check.  So just skip the check if we cannot find the buddy.


Changes against parent d64d76f78c4b4d62481cbb30dc5d2be265b5052b

  patched  libpurple/protocols/mxit/mxit.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/mxit.c	4d59ad8656ff2e1afd030e1b36109bee7dee7fbf
+++ libpurple/protocols/mxit/mxit.c	55d1524e0f39f9e4e0a7104a01d4f414b8fafaf8
@@ -571,19 +571,17 @@ static void mxit_get_info( PurpleConnect
 
 	/* find the buddy information for this contact (reference: "libpurple/blist.h") */
 	buddy = purple_find_buddy( session->acc, who );
-	if ( !buddy ) {
-		purple_debug_warning( MXIT_PLUGIN_ID, "mxit_get_info: unable to find the buddy '%s'\n", who );
-		return;
-	}
+	if ( buddy ) {
+		/* user is in our contact-list, so it's not an invite */
+		contact = purple_buddy_get_protocol_data( buddy );
+		if ( !contact )
+			return;
 
-	contact = purple_buddy_get_protocol_data( buddy );
-	if ( !contact )
-		return;
-
-	/* only MXit users have profiles */
-	if ( contact->type != MXIT_TYPE_MXIT ) {
-		mxit_popup( PURPLE_NOTIFY_MSG_WARNING, _( "No profile available" ), _( "This contact does not have a profile." ) );
-		return;
+		/* only MXit users have profiles */
+		if ( contact->type != MXIT_TYPE_MXIT ) {
+			mxit_popup( PURPLE_NOTIFY_MSG_WARNING, _( "No profile available" ), _( "This contact does not have a profile." ) );
+			return;
+		}
 	}
 
 	/* send profile request */


More information about the Commits mailing list