Filter out empty messages

It's not enough to check for None, we also need to check that there is
actually text in the message.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-11-16 09:14:31 -05:00
parent 3c264554d8
commit adbfd6d2d6
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class Thread:
# Read original message list
o_list = []
for message in self.do_fetch_messages(self.__last_ts):
if message["text"] != None:
if message["text"] != None and len(message["text"]) > 0:
o_list += [ chat.Message(message) ]
o_list.sort()