diff --git a/src/groupchat_control.py b/src/groupchat_control.py index b080748d5de349edcb4c87cecdb1800ae281a1fa..698a71eb854f104689c18ab4e370b978caa62cf5 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -129,6 +129,11 @@ class PrivateChatControl(ChatControl): def send_message(self, message): '''call this function to send our message''' + if not message: + return + + message = helpers.remove_invalid_xml_chars(message) + if not message: return @@ -1604,6 +1609,11 @@ class GroupchatControl(ChatControlBase): def send_message(self, message): '''call this function to send our message''' + if not message: + return + + message = helpers.remove_invalid_xml_chars(message) + if not message: return