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
|
#FIXME: problem see comment in next line
|
||||||
room, nick = \
|
room, nick = \
|
||||||
get_room_and_nick_from_fjid(jid) # if we ban/kick we now real jid
|
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]
|
contact = gc_contacts[account][room][nick]
|
||||||
return contact
|
return contact
|
||||||
|
|
||||||
|
|
|
@ -549,9 +549,16 @@ class TabbedChatWindow(chat.Chat):
|
||||||
"""Send the given message to the active tab"""
|
"""Send the given message to the active tab"""
|
||||||
if not message:
|
if not message:
|
||||||
return
|
return
|
||||||
|
|
||||||
jid = self.get_active_jid()
|
jid = self.get_active_jid()
|
||||||
contact = gajim.get_first_contact_instance_from_jid(self.account, 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')
|
conversation_textview = self.xmls[jid].get_widget('conversation_textview')
|
||||||
message_textview = self.xmls[jid].get_widget('message_textview')
|
message_textview = self.xmls[jid].get_widget('message_textview')
|
||||||
message_buffer = message_textview.get_buffer()
|
message_buffer = message_textview.get_buffer()
|
||||||
|
|
Loading…
Reference in New Issue