Mercurial > libervia-backend
diff src/memory/memory.py @ 507:f98bef71a918
frontends, core, plugin XEP-0045: leave implementation + better nick change
- memory: individual entity cache can be deleted
- plugin XEP-0045: nick change are now detected and userChangedNick signal is sent instead of joined/left
- plugin XEP-0045: leave implementation
- frontends: userChangedNick signal management
- Primitivus: an alert is shown in notification bar in case of error in sendMessage
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Sep 2012 00:26:24 +0200 |
parents | 65ecbb473cbb |
children | 862c0d6ab974 |
line wrap: on
line diff
--- a/src/memory/memory.py Thu Sep 27 00:54:42 2012 +0200 +++ b/src/memory/memory.py Fri Sep 28 00:26:24 2012 +0200 @@ -750,6 +750,18 @@ ret[key] = entity_data[key] return ret + def delEntityCache(self, entity_jid, profile_key): + """Remove cached data for entity + @param entity_jid: JID of the entity + """ + profile = self.getProfileName(profile_key) + try: + del self.entitiesCache[profile][entity_jid.userhost()] + except KeyError: + pass + + + def addWaitingSub(self, _type, entity_jid, profile_key): """Called when a subcription request is received""" profile = self.getProfileName(profile_key)