Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0115.py @ 962:b280cf4cdf25
plugin XEP-0115: fixed bad disco_infos construction
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 31 Mar 2014 20:19:34 +0200 |
parents | 2eb4fef29795 |
children | 218149ea1a35 |
comparison
equal
deleted
inserted
replaced
961:0e8c2414f89c | 962:b280cf4cdf25 |
---|---|
87 return True | 87 return True |
88 | 88 |
89 @defer.inlineCallbacks | 89 @defer.inlineCallbacks |
90 def recalculateHash(self, profile): | 90 def recalculateHash(self, profile): |
91 client = self.host.getClient(profile) | 91 client = self.host.getClient(profile) |
92 disco_infos = yield client.discoHandler.info(client.jid, client.jid, '') | 92 _infos = yield client.discoHandler.info(client.jid, client.jid, '') |
93 disco_infos = disco.DiscoInfo() | |
94 for item in _infos: | |
95 disco_infos.append(item) | |
93 cap_hash = self.host.memory.disco.generateHash(disco_infos) | 96 cap_hash = self.host.memory.disco.generateHash(disco_infos) |
94 info("Our capability hash has been generated: [%s]" % cap_hash) | 97 info("Our capability hash has been generated: [%s]" % cap_hash) |
95 debug("Generating capability domish.Element") | 98 debug("Generating capability domish.Element") |
96 c_elt = domish.Element((NS_ENTITY_CAPABILITY, 'c')) | 99 c_elt = domish.Element((NS_ENTITY_CAPABILITY, 'c')) |
97 c_elt['hash'] = 'sha-1' | 100 c_elt['hash'] = 'sha-1' |