diff --git a/sat/memory/disco.py b/sat/memory/disco.py index 25ec4055..0fec5ce2 100755 --- a/sat/memory/disco.py +++ b/sat/memory/disco.py @@ -87,6 +87,9 @@ class HashManager(object): for hash_, xml in hashes.items(): element = xml_tools.ElementParser()(xml) disco_info = disco.DiscoInfo.fromElement(element) + for ext_form in disco_info.extensions.values(): + # wokkel doesn't call typeCheck on reception, so we do it here + ext_form.typeCheck() if not disco_info.features and not disco_info.identities: log.warning( _( @@ -180,6 +183,12 @@ class Discovery(object): # capability hash is not available, we'll compute one def infosCb(disco_infos): cap_hash = self.generateHash(disco_infos) + for ext_form in disco_infos.extensions.values(): + # wokkel doesn't call typeCheck on reception, so we do it here + # to avoid ending up with incorrect types. We have to do it after + # the hash has been generated (str value is needed to compute the + # hash) + ext_form.typeCheck() self.hashes[cap_hash] = disco_infos self.host.memory.updateEntityData( jid_, C.ENTITY_CAP_HASH, cap_hash, profile_key=client.profile @@ -405,7 +414,7 @@ class Discovery(object): def _discoInfos( self, entity_jid_s, node="", use_cache=True, profile_key=C.PROF_KEY_NONE ): - """ Discovery method for the bridge + """Discovery method for the bridge @param entity_jid_s: entity we want to discover @param use_cache(bool): if True, use cached data if available @param node(unicode): optional node to use