Bug 293944

Summary: Accounts KCM brings accounts to 'Online' presence when enabled
Product: [Frameworks and Libraries] telepathy Reporter: Martin Klapetek <mklapetek>
Component: accounts-kcmAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mail
Priority: NOR    
Version: git-latest   
Target Milestone: Future   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 0.6.1

Description Martin Klapetek 2012-02-12 22:33:46 UTC
This breaks the global presence - if the global presence is 'Away', A-KCM brings freshly enabled account to 'Online', which is not correct.

Since we operate on global presence basis, it should follow global presence as well. Later when we do some fine tuning to this approach, it can (and should be) changed, for now it's a bug.
Comment 1 George Kiagiadakis 2012-07-31 16:01:06 UTC
Currently the KCM itself does:

    if (enabled) {
        // connect the account
        AccountItem *item = index.data(AccountsListModel::AccountItemRole).value<AccountItem*>();
        if (item) {
            item->account()->setRequestedPresence(Tp::Presence::available());
        }
    }

A possible solution, I think, would be to let the kded module listen to the "enabledChanged" signal and set the presence appropriately there. This way, the KCM won't have to know about it. Or alternatively, we could save the current global presence in the AutomaticPresence of all accounts and set ConnectAutomatically to true, although I'm not sure if that will work very well.
Comment 2 Martin Klapetek 2013-04-10 21:04:58 UTC
Git commit 60c38ed3778a3f3914b05315579f6f839474cb3b by Martin Klapetek.
Committed on 10/04/2013 at 23:04.
Pushed by mklapetek into branch 'kde-telepathy-0.6'.

Bring new/enabled accounts to current global presence

Right now the accounts are always connected as online, which among other
things breaks global presence. With this patch the newly added or
enabled accounts are always connected to the current global presence.

Reviewed-by: David Edmundson
FIXED-IN: 0.6.1

M  +6    -1    src/add-account-assistant.cpp
M  +5    -1    src/kcm-telepathy-accounts.cpp
M  +2    -0    src/kcm-telepathy-accounts.h
M  +6    -1    src/salut-enabler.cpp

http://commits.kde.org/telepathy-accounts-kcm/60c38ed3778a3f3914b05315579f6f839474cb3b