Bug 32444

Summary: Tidy up GabblePresenceCache
Product: Telepathy Reporter: Will Thompson <will>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: low Keywords: love
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2010-12-16 09:08:41 UTC
connection_iq_disco_cb() contains the following comment:

      /* Otherwise, is it one of the caps bundles we advertise? These are not
       * just shoved into the cache with gabble_presence_cache_add_own_caps()
       * because capabilities_get_features() always includes a few bonus
       * features...
       */

capabilities_get_features() no longer exists; there's no reason why we can't serve the responses to Google Talk-compatibility bundles like "voice-v1" from the same place as we serve our other caps responses.

So I guess the thing to do would be to replace the calls to gabble_presence_cache_add_bundle_caps() at the end of gabble_presence_cache_add_bundles() with calls to gabble_presence_cache_add_own_caps(), and add one for pmuc-v1 which is just an empty caps set. This would let us simplify connection_iq_disco_cb().

We could get some further simplification by ensuring that our default identity is in the caps cache entry for our own caps nodes, rather than depending on the same one being hard-coded in caps_hash_compute_from_self_presence() and connection_iq_disco_cb().

(In general, the presence cache is fertile ground for refactoring by interested parties.)
Comment 1 GitLab Migration User 2019-12-03 19:50:00 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-gabble/issues/117.

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.