little bugfix : we don't always have a jid

This commit is contained in:
Yann Leboulanger 2005-03-04 22:32:16 +00:00
parent bf961f3b03
commit 32f879a821
1 changed files with 3 additions and 1 deletions

View File

@ -635,7 +635,6 @@ class gc:
def chg_user_status(self, nick, show, status, role, affiliation, jid, \
reason, actor, statusCode, account):
"""When a user change his status"""
ji = jid.split('/')[0]
model = self.tree.get_model()
if show == 'offline' or show == 'error':
if statusCode == '307':
@ -644,6 +643,9 @@ class gc:
self.remove_user(nick)
else:
iter = self.get_user_iter(nick)
ji = jid
if jid:
ji = jid.split('/')[0]
if not iter:
iter = self.add_user_to_roster(nick, show, role, ji)
else: