cpw.darkrain42.buddy-add: 3f343f00: Oscar: Re-request authorization when add...

paul at darkrain42.org paul at darkrain42.org
Sat Jan 17 17:57:19 EST 2009


-----------------------------------------------------------------
Revision: 3f343f00feee4b706c513b7dc6940ce2fe0150d8
Ancestor: 12cbe8e1b9822dd4ee36ec496c2449636a9046fd
Author: paul at darkrain42.org
Date: 2008-12-21T19:15:21
Branch: im.pidgin.cpw.darkrain42.buddy-add
URL: http://d.pidgin.im/viewmtn/revision/info/3f343f00feee4b706c513b7dc6940ce2fe0150d8

Modified files:
        libpurple/protocols/oscar/oscar.c

ChangeLog: 

Oscar: Re-request authorization when adding a buddy that is already on the list.

This might want to simply call purple_auth_request instead of popping up
the request dialog again. I'm not sure which is better.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	cf14e14bd889bd2e7fbdce94b640a863c612be7e
+++ libpurple/protocols/oscar/oscar.c	5f4449420cc56740a5dfcb285dae63ab5d0ebbb4
@@ -4814,19 +4814,26 @@ oscar_add_buddy(PurpleConnection *gc, Pu
 		return;
 	}
 
-	if ((od->ssi.received_data) && !(aim_ssi_itemlist_finditem(od->ssi.local, group->name, buddy->name, AIM_SSI_TYPE_BUDDY))) {
-		purple_debug_info("oscar",
-				   "ssi: adding buddy %s to group %s\n", buddy->name, group->name);
-		aim_ssi_addbuddy(od, buddy->name, group->name, NULL, purple_buddy_get_alias_only(buddy), NULL, NULL, 0);
+	if (od->ssi.received_data) {
+		if (!aim_ssi_itemlist_finditem(od->ssi.local, group->name, buddy->name, AIM_SSI_TYPE_BUDDY)) {
+			purple_debug_info("oscar",
+					   "ssi: adding buddy %s to group %s\n", buddy->name, group->name);
+			aim_ssi_addbuddy(od, buddy->name, group->name, NULL, purple_buddy_get_alias_only(buddy), NULL, NULL, 0);
 
-		/* Mobile users should always be online */
-		if (buddy->name[0] == '+') {
-			purple_prpl_got_user_status(account,
-					purple_buddy_get_name(buddy),
-					OSCAR_STATUS_ID_AVAILABLE, NULL);
-			purple_prpl_got_user_status(account,
-					purple_buddy_get_name(buddy),
-					OSCAR_STATUS_ID_MOBILE, NULL);
+			/* Mobile users should always be online */
+			if (buddy->name[0] == '+') {
+				purple_prpl_got_user_status(account,
+						purple_buddy_get_name(buddy),
+						OSCAR_STATUS_ID_AVAILABLE, NULL);
+				purple_prpl_got_user_status(account,
+						purple_buddy_get_name(buddy),
+						OSCAR_STATUS_ID_MOBILE, NULL);
+			}
+		} else if (aim_ssi_waitingforauth(od->ssi.local,
+		                                  aim_ssi_itemlist_findparentname(od->ssi.local, purple_buddy_get_name(buddy)),
+		                                  purple_buddy_get_name(buddy))) {
+			/* Not authorized -- Re-request authorization */
+			purple_auth_sendrequest(gc, purple_buddy_get_name(buddy));
 		}
 	}
 


More information about the Commits mailing list