don't send empty messages
This commit is contained in:
parent
f076a17de1
commit
a51c63ae35
|
@ -795,6 +795,8 @@ class Connection:
|
||||||
def send_message(self, jid, msg, keyID):
|
def send_message(self, jid, msg, keyID):
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
|
if not msg:
|
||||||
|
return
|
||||||
msgtxt = msg
|
msgtxt = msg
|
||||||
msgenc = ''
|
msgenc = ''
|
||||||
if keyID and USE_GPG:
|
if keyID and USE_GPG:
|
||||||
|
|
|
@ -495,6 +495,8 @@ class GroupchatWindow(chat.Chat):
|
||||||
|
|
||||||
def send_gc_message(self, message):
|
def send_gc_message(self, message):
|
||||||
'''call this function to send our message'''
|
'''call this function to send our message'''
|
||||||
|
if not message:
|
||||||
|
return
|
||||||
room_jid = self.get_active_jid()
|
room_jid = self.get_active_jid()
|
||||||
message_textview = self.xmls[room_jid].get_widget(
|
message_textview = self.xmls[room_jid].get_widget(
|
||||||
'message_textview')
|
'message_textview')
|
||||||
|
|
|
@ -304,6 +304,8 @@ class TabbedChatWindow(chat.Chat):
|
||||||
|
|
||||||
def send_message(self, message):
|
def send_message(self, message):
|
||||||
"""Send the message given in the args"""
|
"""Send the message given in the args"""
|
||||||
|
if not message:
|
||||||
|
return
|
||||||
jid = self.get_active_jid()
|
jid = self.get_active_jid()
|
||||||
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')
|
||||||
|
|
Loading…
Reference in New Issue