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

@ -105,7 +105,7 @@ class XEP_0054(object):
# hashs in memory. Hashed should be shared between profiles
for jid_s, avatar_hash in self.avatars_cache.iteritems():
jid_ = jid.JID(jid_s)
self.host.memory.updateEntityData(jid_, "avatar", avatar_hash, profile)
self.host.memory.updateEntityData(jid_, "avatar", avatar_hash, silent=True, profile_key=profile)
@defer.inlineCallbacks
def profileConnected(self, profile):
@ -122,7 +122,7 @@ class XEP_0054(object):
@param profile: profile which received the update
"""
assert not jid_.resource # VCard are retrieved with bare jid
self.host.memory.updateEntityData(jid_, name, value, profile)
self.host.memory.updateEntityData(jid_, name, value, profile_key=profile)
if name == "avatar":
self.avatars_cache[jid_.userhost()] = value