don't send empty messages

This commit is contained in:
Yann Leboulanger 2005-06-21 20:04:23 +00:00
parent f076a17de1
commit a51c63ae35
3 changed files with 6 additions and 0 deletions

View File

@ -795,6 +795,8 @@ class Connection:
def send_message(self, jid, msg, keyID):
if not self.connection:
return
if not msg:
return
msgtxt = msg
msgenc = ''
if keyID and USE_GPG:

View File

@ -495,6 +495,8 @@ class GroupchatWindow(chat.Chat):
def send_gc_message(self, message):
'''call this function to send our message'''
if not message:
return
room_jid = self.get_active_jid()
message_textview = self.xmls[room_jid].get_widget(
'message_textview')

View File

@ -304,6 +304,8 @@ class TabbedChatWindow(chat.Chat):
def send_message(self, message):
"""Send the message given in the args"""
if not message:
return
jid = self.get_active_jid()
conversation_textview = self.xmls[jid].get_widget('conversation_textview')
message_textview = self.xmls[jid].get_widget('message_textview')