Bug 271796

Summary: Return from auto-away should unset away flags on connections in disconnected state
Product: [Applications] konversation Reporter: Martin Blumenstingl <martin.blumenstingl>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: CONFIRMED ---    
Severity: normal CC: hein, kde
Priority: NOR    
Version: 1.5-rc1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Blumenstingl 2011-04-26 19:22:31 UTC
Version:           Git (using KDE 4.6.2) 
OS:                Linux

Return from auto-away should unset away flags on connections in disconnected state.
Looks like this has never been done right.

Reproducible: Didn't try

Steps to Reproduce:
-you're connected to a network
-you go auto-away
-you get disconnected from the network
-you return
-you connect to the network again

Actual Results:  
upon reconnect konvi marks me as away again

Expected Results:  
Konversation should *NOT* mark me as away when I'm reconnected.

Most of the isConnected() checks in awaymanager.cpp are probably wrong.
Comment 1 Eike Hein 2011-04-26 19:52:06 UTC
Some notes on this:

- Konversation, long since before it ever got auto-away support, tries to carry away state across reconnects. The idea being that if you were marked away before getting disconnected, or even manually disconnecting, chances are you want to be marked away after reconnecting, too. I think that idea is still valid.

- Away Manager, and this is where the error lies, was written to never be active unless it must be, to cut down on timer wakeups. That currently means it only starts doing stuff when an identity with auto-away enabled is actually seeing use in an established connection, and stops doing stuff when the "identity goes offline". This clashes with carrying away-state across reconnects, because it means it won't catch and implement a return event for connections in a disconnected state, which remember they were away when they were last connected, and recreate that after reconnecting. AwayManager will have to move from thinking about "identities which are onlie" to thinkining about "identities which are in use" at least to some degree.