Skip to content
Snippets Groups Projects
Commit 49746318 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Caps: Add hash_method property

parent 264c53f1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment