core (memory): updateEntityData now accept a "silent" argument to avoid sending signal to frontends when updating an attribute with "signalOnUpdate" flag.

This commit is contained in:
Goffi 2015-02-09 21:39:51 +01:00
commit cdfb2c4dc6

View file

@ -107,7 +107,7 @@ class XEP_0115(object):
client.caps_sent = False
if cap_hash not in self.host.memory.disco.hashes:
self.host.memory.disco.hashes[cap_hash] = disco_infos
self.host.memory.updateEntityData(client.jid, C.ENTITY_CAP_HASH, cap_hash, profile)
self.host.memory.updateEntityData(client.jid, C.ENTITY_CAP_HASH, cap_hash, profile_key=profile)
class XEP_0115_handler(XMPPHandler):
@ -146,7 +146,7 @@ class XEP_0115_handler(XMPPHandler):
if c_ver in self.host.memory.disco.hashes:
# we already know the hash, we update the jid entity
log.debug ("hash [%(hash)s] already in cache, updating entity [%(jid)s]" % {'hash': c_ver, 'jid': from_jid.full()})
self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, self.profile)
self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, profile_key=self.profile)
return
if c_hash != 'sha-1': # unknown hash method