From 2377437112efb21dd8edbe5ffd341e703e9d8391 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Fri, 20 May 2005 11:23:08 +0000
Subject: [PATCH] do not print empty message (fix #301)

---
 src/common/connection.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/common/connection.py b/src/common/connection.py
index 4349acd346..67e6a2a769 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -173,11 +173,13 @@ class Connection:
 
 	def _messageCB(self, con, msg):
 		"""Called when we recieve a message"""
+		msgtxt = msg.getBody()
+		if not msgtxt: # empty message
+			return
 		mtype = msg.getType()
 		tim = msg.getTimestamp()
 		tim = time.strptime(tim, '%Y%m%dT%H:%M:%S')
 		tim = time.localtime(timegm(tim))
-		msgtxt = msg.getBody()
 		xtags = msg.getTags('x')
 		encTag = None
 		decmsg = ''
-- 
GitLab