diff --git a/gajim/common/caps_cache.py b/gajim/common/caps_cache.py index 77a0ee164fb5aed843a85ef1619a52bab52ce2c5..fc8530c003493f56bd785eeb0f5e3bf778752fcc 100644 --- a/gajim/common/caps_cache.py +++ b/gajim/common/caps_cache.py @@ -111,6 +111,10 @@ def __init__(self, caps_hash, node): self._node = node self._hash_method = None + @property + def hash_method(self): + return self._hash_method + def get_discover_strategy(self): return self._discover diff --git a/gajim/common/modules/caps.py b/gajim/common/modules/caps.py index d0a229737fa4d47fb3d4cdf58115316a4d653e47..82a8af83724f07f2551ce2ee2387756b6871cf74 100644 --- a/gajim/common/modules/caps.py +++ b/gajim/common/modules/caps.py @@ -40,7 +40,8 @@ def __init__(self, con): ] self._capscache = caps_cache.capscache - self._create_suitable_client_caps = caps_cache.create_suitable_client_caps + self._create_suitable_client_caps = \ + caps_cache.create_suitable_client_caps def _entity_caps(self, _con, _stanza, properties): if properties.type.is_error or properties.type.is_unavailable: @@ -63,7 +64,7 @@ def _entity_caps(self, _con, _stanza, properties): node, caps_hash, hash_method, jid) # Type is None means 'available' - if properties.type.is_available and client_caps._hash_method == 'no': + if properties.type.is_available and client_caps.hash_method == 'no': self._capscache.forget_caps(client_caps) client_caps = self._create_suitable_client_caps( node, caps_hash, hash_method)