memory: don't save last resource in entity data for the MUC jids
This commit is contained in:
parent
100ba3969e
commit
2f6b8ae771
1 changed files with 6 additions and 1 deletions
|
|
@ -423,7 +423,12 @@ class Memory(object):
|
|||
entity_data = self._getEntitiesData(entity_jid, profile)[entity_jid]
|
||||
resource = entity_jid.resource
|
||||
if resource:
|
||||
self.updateEntityData(entity_jid.userhostJID(), C.ENTITY_LAST_RESOURCE, resource, profile)
|
||||
try:
|
||||
type_ = self.getEntityDatum(entity_jid.userhostJID(), 'type', profile)
|
||||
except KeyError:
|
||||
type_ = 'contact'
|
||||
if type_ != 'chatroom':
|
||||
self.updateEntityData(entity_jid.userhostJID(), C.ENTITY_LAST_RESOURCE, resource, profile)
|
||||
entity_data.setdefault("presence", {})[resource or ''] = (show, priority, statuses)
|
||||
|
||||
def _getEntitiesData(self, entity_jid, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue