do not print empty message (fix #301)
This commit is contained in:
parent
894e38cc7f
commit
2377437112
|
@ -173,11 +173,13 @@ class Connection:
|
||||||
|
|
||||||
def _messageCB(self, con, msg):
|
def _messageCB(self, con, msg):
|
||||||
"""Called when we recieve a message"""
|
"""Called when we recieve a message"""
|
||||||
|
msgtxt = msg.getBody()
|
||||||
|
if not msgtxt: # empty message
|
||||||
|
return
|
||||||
mtype = msg.getType()
|
mtype = msg.getType()
|
||||||
tim = msg.getTimestamp()
|
tim = msg.getTimestamp()
|
||||||
tim = time.strptime(tim, '%Y%m%dT%H:%M:%S')
|
tim = time.strptime(tim, '%Y%m%dT%H:%M:%S')
|
||||||
tim = time.localtime(timegm(tim))
|
tim = time.localtime(timegm(tim))
|
||||||
msgtxt = msg.getBody()
|
|
||||||
xtags = msg.getTags('x')
|
xtags = msg.getTags('x')
|
||||||
encTag = None
|
encTag = None
|
||||||
decmsg = ''
|
decmsg = ''
|
||||||
|
|
Loading…
Reference in New Issue