Mercurial > libervia-backend
diff src/plugins/plugin_xep_0085.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 | faa1129559b8 |
children | 22fce2e51c70 2c6c93438f74 |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0085.py Mon Feb 09 21:39:51 2015 +0100 +++ b/src/plugins/plugin_xep_0085.py Mon Feb 09 21:39:51 2015 +0100 @@ -137,7 +137,7 @@ if value == DELETE_VALUE: self.host.memory.delEntityData(entity_jid, ENTITY_KEY, profile) else: - self.host.memory.updateEntityData(entity_jid, ENTITY_KEY, value, profile) + self.host.memory.updateEntityData(entity_jid, ENTITY_KEY, value, profile_key=profile) if not value or value == DELETE_VALUE: # reinit chat state UI for this or these contact(s) self.host.bridge.chatStateReceived(entity_jid.full(), "", profile) @@ -151,7 +151,7 @@ @param type_: parameter type """ if (category, name) == (PARAM_KEY, PARAM_NAME): - self.updateEntityData(C.ENTITY_ALL, True if bool("true") else DELETE_VALUE, profile) + self.updateEntityData(C.ENTITY_ALL, True if bool("true") else DELETE_VALUE, profile_key=profile) return False return True @@ -173,11 +173,11 @@ try: domish.generateElementsNamed(message.elements(), name="active").next() # contact enabled Chat State Notifications - self.updateEntityData(from_jid, True, profile) + self.updateEntityData(from_jid, True, profile_key=profile) except StopIteration: if message.getAttribute('type') == 'chat': # contact didn't enable Chat State Notifications - self.updateEntityData(from_jid, False, profile) + self.updateEntityData(from_jid, False, profile_key=profile) return True except StopIteration: pass @@ -260,7 +260,7 @@ except (exceptions.UnknownEntityError, KeyError): if forceEntityData: # enable it for the first time - self.updateEntityData(to_jid, True, profile) + self.updateEntityData(to_jid, True, profile_key=profile) return True # wait for the first message before sending states return False