Bug 52259

Summary: Enabling an account does not make it go online
Product: Telepathy Reporter: Xavier Claessens <xclaesse>
Component: mission-controlAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: xclaesse
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Do not change RequestedPresence when disabling the account

Description Xavier Claessens 2012-07-19 10:27:53 UTC
Steps:
1) have a GOA account enabled
2) set presence to available in empathy/gnome-shell
3) disable the GOA account via gnome-control-center, account goes offline
4) enable the GOA account via gnome-control-center, account stay offline

I think in the scenario the account should go online. Problem is GOA does not know about tp/mc.

The reason the account stay offline is in _mcd_account_set_enabled(), when disabling the account it sets the RequestedPresence to Offline, then when enabling the account it calls mcd_account_rerequest_presence() but that just request offline again...

empathy-accounts work around this by requesting the "most available" presence on the account just after enabling it.

What I suggest is to decouple RequestedPresence and Enabled. So we could have RequestedPresence=Available Enabled=False and that result to account being offline. Changing RequestedPresence on a disabled account would be allowed but won't connect the account until the account gets enabled.
Comment 1 Simon McVittie 2012-07-19 10:30:30 UTC
(In reply to comment #0)
> What I suggest is to decouple RequestedPresence and Enabled. So we could have
> RequestedPresence=Available Enabled=False and that result to account being
> offline. Changing RequestedPresence on a disabled account would be allowed but
> won't connect the account until the account gets enabled.

Because MC is some sort of tangled cobweb internally (McdAccount and McdConnection call into each other), you'll need to be careful that McdConnection doesn't try to connect disabled accounts because their RequestedPresence is no longer offline.
Comment 2 Xavier Claessens 2012-07-19 10:41:11 UTC
Created attachment 64385 [details] [review]
Do not change RequestedPresence when disabling the account

We can keep RequestedPresence to online, in which case the account
will go back online when account gets enabled.
Comment 3 Xavier Claessens 2012-08-21 09:21:31 UTC
The patch has been merged already. Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.