Bug 318364 - Invalid accounts are not handled properly
Summary: Invalid accounts are not handled properly
Alias: None
Product: telepathy
Classification: Unclassified
Component: accounts-kcm (show other bugs)
Version: 0.6.0
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: Future
Assignee: Telepathy Bugs
Depends on:
Reported: 2013-04-14 23:08 UTC by K G
Modified: 2014-04-13 21:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.8.1

Contact list view (60.64 KB, image/png)
2013-04-14 23:15 UTC, K G
Account KCM (128.52 KB, image/png)
2013-04-14 23:22 UTC, K G

Note You need to log in before you can comment on or make changes to this bug.
Description K G 2013-04-14 23:08:27 UTC
Because of bug 311372 to have working gadu-gadu account I used to do flowing steps:
1 Create telepathy-sunshine account in  mc-tool (without gnome keyring)
2. Remove old ts account 
3. Enable account created in step one. 
(it could be done also in another order)

After  restart/relogon  telepathy-sunshine acount wasn't present in mission-control. However, it was still listed in KTP KCM. That's why i need to repeat all  steps every time.

In 0.6 Old account  isn't displayed any more. That's ok because I don't need to remove it. The problem is that there is still (empty) group in contact list for that account.  And I have no option to remove it.

Reproducible: Always

Steps to Reproduce:
1.Create telepathy-sunshine account in mc-tool without storing in in Gnome-keyring
2.Enable it in KTP
3. Logout
4 Login Again
Actual Results:  
There is no account in mc as wel as in KTP acounts kcm. But there is group for it in Contact list. 

Expected Results:  
No group in Contact list or (like in 0.5) display that account to be able to remove it correctly
Comment 1 K G 2013-04-14 23:15:28 UTC
Created attachment 78908 [details]
Contact list view

Multiply account. Only the last one is related to existing acount
Comment 2 K G 2013-04-14 23:22:24 UTC
Created attachment 78910 [details]
Account KCM

As you can see there is only one gadu-gadu account
Comment 3 David Edmundson 2013-04-14 23:23:09 UTC
When you close/reopen the contact list do these ghost entries go away?
Comment 4 K G 2013-04-14 23:34:51 UTC
After reopening contact list nothing changes.
Comment 5 K G 2013-04-15 01:36:39 UTC
I found what's going on. Account wasn't displayed by mc-tool list, but was still remembered by telepathy mc. Accounts had flag invalid and that account wasn't displayed  by mc and ktp 0.6. 

After removing accounts by mc-tool unnecessary  groups disappeared. 
I thing to avoid confusion invalid accounts shod be displayed in accounts kcm but should be marked somehow.

For me there is no problem now. I wrote script removing and reading account at startup.
Comment 6 David Edmundson 2013-04-15 10:16:20 UTC
Confirming this bug, I never once thought to check account validity as well as the enabled flag.
Comment 7 Martin Klapetek 2014-04-13 21:32:51 UTC
Git commit a5f7989e6f588ba265701f020d600989b7d21823 by Martin Klapetek.
Committed on 13/04/2014 at 21:32.
Pushed by mklapetek into branch 'kde-telepathy-0.8'.

Add contacts only from valid accounts

Reviewed-by: David Edmundson
FIXED-IN: 0.8.1

M  +5    -3    KTp/Models/accounts-tree-proxy-model.cpp
M  +4    -2    KTp/global-contact-manager.cpp