don't crash if we open a pm after he left the room

This commit is contained in:
Yann Leboulanger 2005-12-13 21:26:31 +00:00
parent c7b36b781c
commit d2e4a230c8
1 changed files with 4 additions and 1 deletions

View File

@ -1283,7 +1283,10 @@ class Interface:
w = wins['chats'][jid]
else:
room_jid, nick = jid.split('/', 1)
show = gajim.gc_contacts[account][room_jid][nick].show
if gajim.gc_contacts[account][room_jid].has_key(nick):
show = gajim.gc_contacts[account][room_jid][nick].show
else:
show = 'offline':
c = Contact(jid = jid, name = nick, groups = ['none'],
show = show, ask = 'none')
self.roster.new_chat(c, account)