changeset 19394:bbaa74c3264a

I'm going to assume this works, without the benefit of testing. Restore AIM idle time on a reconnect. Fixes #333
author Sean Egan <seanegan@gmail.com>
date Thu, 23 Aug 2007 23:04:48 +0000
parents ecf46f3674a9
children 8ce97365b418
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Thu Aug 23 22:21:01 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Thu Aug 23 23:04:48 2007 +0000
@@ -3529,6 +3529,7 @@
 	PurpleConnection *gc;
 	PurpleAccount *account;
 	PurpleStatus *status;
+	PurplePresence *presence;
 	const char *message, *itmsurl;
 	char *tmp;
 	va_list ap;
@@ -3572,7 +3573,8 @@
 	aim_srv_setextrainfo(od, FALSE, 0, TRUE, tmp, itmsurl);
 	g_free(tmp);
 
-	aim_srv_setidle(od, 0);
+	presence = purple_status_get_presence(status);
+	aim_srv_setidle(od, purple_presence_is_idle(presence) ? 0 : time(NULL) - purple_presence_get_idle_time(presence));
 
 	if (od->icq) {
 		aim_icq_reqofflinemsgs(od);