comparison 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
comparison
equal deleted inserted replaced
506:2e43c74815ad 507:f98bef71a918
748 for key in keys_list: 748 for key in keys_list:
749 if key in entity_data: 749 if key in entity_data:
750 ret[key] = entity_data[key] 750 ret[key] = entity_data[key]
751 return ret 751 return ret
752 752
753 def delEntityCache(self, entity_jid, profile_key):
754 """Remove cached data for entity
755 @param entity_jid: JID of the entity
756 """
757 profile = self.getProfileName(profile_key)
758 try:
759 del self.entitiesCache[profile][entity_jid.userhost()]
760 except KeyError:
761 pass
762
763
764
753 def addWaitingSub(self, _type, entity_jid, profile_key): 765 def addWaitingSub(self, _type, entity_jid, profile_key):
754 """Called when a subcription request is received""" 766 """Called when a subcription request is received"""
755 profile = self.getProfileName(profile_key) 767 profile = self.getProfileName(profile_key)
756 assert(profile) 768 assert(profile)
757 if not self.subscriptions.has_key(profile): 769 if not self.subscriptions.has_key(profile):