core (memory/disco): getInfos now handle node + use client instead of profile in many methods

This commit is contained in:
Goffi 2017-02-12 20:43:20 +01:00
commit 3bc851abf2

View file

@ -83,8 +83,9 @@ class XEP_0300(object):
@return (D(unicode, None)): best available algorithm,
or None if hashing is not possible
"""
client = self.host.getClient(profile)
for algo in reversed(XEP_0300.ALGOS):
has_feature = yield self.host.hasFeature(NS_HASHES_FUNCTIONS.format(algo), to_jid, profile)
has_feature = yield self.host.hasFeature(client, NS_HASHES_FUNCTIONS.format(algo), to_jid)
if has_feature:
log.debug(u"Best hashing algorithm found for {jid}: {algo}".format(
jid=to_jid.full(),