if a user log on with a resource then log off and log on with another resources, we must remove old user, what is done now

This commit is contained in:
Yann Leboulanger 2004-06-03 19:47:45 +00:00
parent 403265a767
commit 94bab4e9ef
1 changed files with 2 additions and 2 deletions

View File

@ -523,7 +523,6 @@ class roster_Window:
if (show == 'offline' or show == 'error') and not showOffline:
if len(self.contacts[account][user.jid]) > 1:
luser = self.contacts[account][user.jid]
user1 = None
for u in luser:
if u.resource == user.resource:
luser.remove(u)
@ -1264,7 +1263,8 @@ class plugin:
break
if not user1:
user1 = self.roster.contacts[ev[1]][ji][0]
if resources != ['']:
if resources != [''] and (len(luser) != 1 or
luser[0].show != 'offline'):
user1 = user(user1.jid, user1.name, user1.groups, \
user1.show, user1.status, user1.sub, user1.resource)
luser.append(user1)