Bug 293944 - Accounts KCM brings accounts to 'Online' presence when enabled
Summary: Accounts KCM brings accounts to 'Online' presence when enabled
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: accounts-kcm (show other bugs)
Version: git-latest
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 22:33 UTC by Martin Klapetek
Modified: 2013-04-10 21:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.6.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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