comparison sat/plugins/plugin_xep_0054.py @ 3560:413e96caa682

plugin XEP-0054: fix call to JID serialisation method
author Goffi <goffi@goffi.org>
date Thu, 10 Jun 2021 15:43:28 +0200
parents 184c66256bbc
children 36849fb5c854
comparison
equal deleted inserted replaced
3559:c8d980d694a7 3560:413e96caa682
437 437
438 def _checkAvatarHash(self, client, entity, given_hash): 438 def _checkAvatarHash(self, client, entity, given_hash):
439 """Check that hash in cache (i.e. computed hash) is the same as given one""" 439 """Check that hash in cache (i.e. computed hash) is the same as given one"""
440 # XXX: if they differ, the avatar will be requested on each connection 440 # XXX: if they differ, the avatar will be requested on each connection
441 # TODO: try to avoid re-requesting avatar in this case 441 # TODO: try to avoid re-requesting avatar in this case
442 computed_hash = client._xep_0054_avatar_hashes[entity.full] 442 computed_hash = client._xep_0054_avatar_hashes[entity.full()]
443 if computed_hash != given_hash: 443 if computed_hash != given_hash:
444 log.warning( 444 log.warning(
445 "computed hash differs from given hash for {entity}:\n" 445 "computed hash differs from given hash for {entity}:\n"
446 "computed: {computed}\ngiven: {given}".format( 446 "computed: {computed}\ngiven: {given}".format(
447 entity=entity, computed=computed_hash, given=given_hash 447 entity=entity, computed=computed_hash, given=given_hash