Bug 127921 - Contact status not correct updated after reconnect to internet
Summary: Contact status not correct updated after reconnect to internet
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-24 09:14 UTC by Heiko Schaefer
Modified: 2006-05-27 12:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Schaefer 2006-05-24 09:14:42 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs
OS:                Linux

If I disconnect from the internet without setting my ICQ account to offline before and then reconnect to internet and ICQ, the status of my contacts is unchanged, even if they went offline.

Only a restart of Kopete updates the status in the contactlist.
Comment 1 Roman Jarosz 2006-05-27 12:19:05 UTC
SVN commit 545306 by rjarosz:

Fix bug 127921: Contact status not correct updated after reconnect to internet

BUG: 127921



 M  +9 -0      aim/aimaccount.cpp  
 M  +14 -0     icq/icqaccount.cpp  


--- branches/kopete/0.12/kopete/protocols/oscar/aim/aimaccount.cpp #545305:545306
@@ -580,6 +580,15 @@
 {
 	kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl;
 	myself()->setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusOffline );
+
+	QDictIterator<Kopete::Contact> it( contacts() );
+	for( ; it.current(); ++it )
+	{
+		OscarContact* oc = dynamic_cast<OscarContact*>( it.current() );
+		if ( oc )
+			oc->setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusOffline );
+	}
+
 	OscarAccount::disconnected( reason );
 }
 
--- branches/kopete/0.12/kopete/protocols/oscar/icq/icqaccount.cpp #545305:545306
@@ -195,6 +195,20 @@
 	kdDebug(14153) << k_funcinfo << "Attempting to set status offline" << endl;
 	ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() );
 	myself()->setOnlineStatus( presOffline.toOnlineStatus() );
+
+	QDictIterator<Kopete::Contact> it( contacts() );
+	for( ; it.current(); ++it )
+	{
+		OscarContact* oc = dynamic_cast<OscarContact*>( it.current() );
+		if ( oc )
+		{
+			if ( oc->ssiItem().waitingAuth() )
+				oc->setOnlineStatus( protocol()->statusManager()->waitingForAuth() );
+			else
+				oc->setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() );
+		}
+	}
+
 	OscarAccount::disconnected( reason );
 }