fix TB
This commit is contained in:
parent
ecb476d796
commit
ab3263c5ba
|
@ -95,7 +95,8 @@ def get_first_contact_instance_from_jid(account, jid):
|
|||
#FIXME: problem see comment in next line
|
||||
room, nick = \
|
||||
get_room_and_nick_from_fjid(jid) # if we ban/kick we now real jid
|
||||
if nick in gc_contacts[account][room]:
|
||||
if gc_contacts[account].has_key(room) and \
|
||||
nick in gc_contacts[account][room]:
|
||||
contact = gc_contacts[account][room][nick]
|
||||
return contact
|
||||
|
||||
|
|
|
@ -552,6 +552,13 @@ class TabbedChatWindow(chat.Chat):
|
|||
|
||||
jid = self.get_active_jid()
|
||||
contact = gajim.get_first_contact_instance_from_jid(self.account, jid)
|
||||
if contact is None:
|
||||
# contact was from pm in MUC, and left the room, or we left the room
|
||||
room, nick = gajim.get_room_and_nick_from_fjid(jid)
|
||||
dialogs.ErrorDialog(_('Sending private message failed'),
|
||||
_('You are no longer in room "%s" or "%s" has left.') % \
|
||||
(room, nick)).get_response()
|
||||
return
|
||||
conversation_textview = self.xmls[jid].get_widget('conversation_textview')
|
||||
message_textview = self.xmls[jid].get_widget('message_textview')
|
||||
message_buffer = message_textview.get_buffer()
|
||||
|
|
Loading…
Reference in New Issue