Bug 57739 - AccountsModel does not list Salut contacts on load
Summary: AccountsModel does not list Salut contacts on load
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: git master
Hardware: All All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-30 15:56 UTC by sander
Modified: 2019-12-03 20:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
use ContactManager features instead of Connection features for FeatureRosterGroups check (927 bytes, text/plain)
2012-11-30 15:56 UTC, sander
Details
also use ContactManager features check in addition to Connection features check (972 bytes, patch)
2012-11-30 17:34 UTC, sander
Details | Splinter Review

Description sander 2012-11-30 15:56:26 UTC
Created attachment 70836 [details]
use ContactManager features instead of Connection features for FeatureRosterGroups check

With a local-xmpp account and using telepathy-qt + ktp-contactlist, when going from offline to available, no contacts on the network will be found. Only contacts that come online later will be added to the contact list.

The original bug can be found here : https://bugs.kde.org/show_bug.cgi?id=301786

I've done some experimenting with local xmpp and also a jabber account to verify behaviour. It looks like the contact list groups are wrongfully assumed for local-xmpp because the features of the Connection are checked. The requestedFeatures on the connection contains a Connection::FeatureRosterGroups feature, leading to a situation where setStateSuccess() is never called, because in introspectGroups() the missing functionality is caught and short-circuited. 

My guess is it should instead check on the supported features of the ContactManager, not on the requested features of the Connection. I've created a patch, which makes local-xmpp behave as expected.
Comment 1 sander 2012-11-30 17:34:57 UTC
Created attachment 70838 [details] [review]
also use ContactManager features check in addition to Connection features check

both conditionals are actually needed
Comment 2 sander 2012-12-17 12:15:45 UTC
ping!

bug with fix/patch, should be easy to apply & close this?
Comment 3 Vadim A. Misbakh-Soloviov (mva) 2012-12-29 14:37:31 UTC
Hey! Any devs activity here?
It is very important bug for me and some more people!
Comment 4 George Kiagiadakis 2013-01-03 19:20:22 UTC
I *think* this is the well-known problem that factories do not have optional features. If one feature fails to become ready, then the whole operation fails.

Here the Connection is trying to become ready, creating and populating the ContactManager in the process. However, because salut does not implement contact list groups, Connection::FeatureRosterGroups fails and the whole object remains in a broken state. This patch is only a workaround that fixes ContactManager's state and is probably part of the solution, but not the whole solution.

I am not very willing to merge it as it is, given that it complicates even more the already highly complex roster introspection monster... At least, not without a proving unit test, which I am sure will make other problems appear and will force us to effectively make Connection::FeatureRosterGroups "optional" (which is a completely sane thing to do btw, I am all for it).
Comment 5 GitLab Migration User 2019-12-03 20:29:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-qt/issues/44.


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.