pidgin.2.5.8: 682f4849: *** Plucked rev 066619e375f28c7d7fe42655...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Jun 25 20:20:44 EDT 2009


-----------------------------------------------------------------
Revision: 682f4849ee5ce760bf620b021d00c0c4b7e68f79
Ancestor: 81e7f59e74715d44dac9e40e7b43ff377c8b474c
Author: rekkanoryo at pidgin.im
Date: 2009-06-25T23:30:58
Branch: im.pidgin.pidgin.2.5.8
URL: http://d.pidgin.im/viewmtn/revision/info/682f4849ee5ce760bf620b021d00c0c4b7e68f79

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

ChangeLog: 

*** Plucked rev 066619e375f28c7d7fe42655607c72fe107f6ebf (sadrul at pidgin.im):
Detect properly when yahoo buddies go offline.


-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c	fb99edd98a8d003a621cf404c01daa64216d623a
+++ libpurple/protocols/yahoo/yahoo.c	c3e5a917837b881f85d89c84eafb7949afde74d6
@@ -72,12 +72,10 @@ static void yahoo_update_status(PurpleCo
 	if (!gc || !name || !f || !purple_find_buddy(purple_connection_get_account(gc), name))
 		return;
 
-	if (f->status == YAHOO_STATUS_OFFLINE)
-	{
-		return;
-	}
-
 	switch (f->status) {
+	case YAHOO_STATUS_OFFLINE:
+		status = YAHOO_STATUS_TYPE_OFFLINE;
+		break;
 	case YAHOO_STATUS_AVAILABLE:
 		status = YAHOO_STATUS_TYPE_AVAILABLE;
 		break;
@@ -335,11 +333,15 @@ static void yahoo_process_status(PurpleC
 		l = l->next;
 	}
 
-	if (message && f)
-		yahoo_friend_set_status_message(f, yahoo_string_decode(gc, message, unicode));
+	if (f) {
+		if (pkt->service == YAHOO_SERVICE_LOGOFF)
+			f->status = YAHOO_STATUS_OFFLINE;
+		if (message)
+			yahoo_friend_set_status_message(f, yahoo_string_decode(gc, message, unicode));
 
-	if (name && f) /* update the last buddy */
-		yahoo_update_status(gc, name, f);
+		if (name) /* update the last buddy */
+			yahoo_update_status(gc, name, f);
+	}
 }
 
 static void yahoo_do_group_check(PurpleAccount *account, GHashTable *ht, const char *name, const char *group)


More information about the Commits mailing list