Commit e3485cc2 authored by Madhur Garg's avatar Madhur Garg

Changed the check on an empty message because the earlier one might leave an...

Changed the check on an empty message because the earlier one might leave an empty body in XML representation.
parent dfec8bdf
......@@ -84,7 +84,8 @@ async def query(self, remote_jid, start, end, top):
async for rsm in results:
if top:
for msg in rsm['mam']['results']:
if msg['mam_result']['forwarded']['stanza']['body'] is not '':
if msg['mam_result']['forwarded']['stanza'].xml.find(
'{%s}%s' % ('jabber:client', 'body')) is not None:
msgs.append(msg)
if msg_count == 10:
self.query_id = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment