comparison src/plugins/plugin_xep_0115.py @ 1315:be3a301540c0 frontends_multi_profiles

core (memory): updateEntityData now accept a "silent" argument to avoid sending signal to frontends when updating an attribute with "signalOnUpdate" flag.
author Goffi <goffi@goffi.org>
date Mon, 09 Feb 2015 21:39:51 +0100
parents 8b891f9be183
children 069ad98b360d
comparison
equal deleted inserted replaced
1314:bb9c32249778 1315:be3a301540c0
105 XEP_0115.c_elt = c_elt 105 XEP_0115.c_elt = c_elt
106 if client.caps_optimize: 106 if client.caps_optimize:
107 client.caps_sent = False 107 client.caps_sent = False
108 if cap_hash not in self.host.memory.disco.hashes: 108 if cap_hash not in self.host.memory.disco.hashes:
109 self.host.memory.disco.hashes[cap_hash] = disco_infos 109 self.host.memory.disco.hashes[cap_hash] = disco_infos
110 self.host.memory.updateEntityData(client.jid, C.ENTITY_CAP_HASH, cap_hash, profile) 110 self.host.memory.updateEntityData(client.jid, C.ENTITY_CAP_HASH, cap_hash, profile_key=profile)
111 111
112 112
113 class XEP_0115_handler(XMPPHandler): 113 class XEP_0115_handler(XMPPHandler):
114 implements(iwokkel.IDisco) 114 implements(iwokkel.IDisco)
115 115
144 return 144 return
145 145
146 if c_ver in self.host.memory.disco.hashes: 146 if c_ver in self.host.memory.disco.hashes:
147 # we already know the hash, we update the jid entity 147 # we already know the hash, we update the jid entity
148 log.debug ("hash [%(hash)s] already in cache, updating entity [%(jid)s]" % {'hash': c_ver, 'jid': from_jid.full()}) 148 log.debug ("hash [%(hash)s] already in cache, updating entity [%(jid)s]" % {'hash': c_ver, 'jid': from_jid.full()})
149 self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, self.profile) 149 self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, profile_key=self.profile)
150 return 150 return
151 151
152 if c_hash != 'sha-1': # unknown hash method 152 if c_hash != 'sha-1': # unknown hash method
153 log.warning(_('Unknown hash method for entity capabilities: [%(hash_method)s] (entity: %(jid)s, node: %(node)s)') % {'hash_method':c_hash, 'jid': from_jid, 'node': c_node}) 153 log.warning(_('Unknown hash method for entity capabilities: [%(hash_method)s] (entity: %(jid)s, node: %(node)s)') % {'hash_method':c_hash, 'jid': from_jid, 'node': c_node})
154 154