summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-08-08 17:12:19 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-08-22 00:54:25 +0530
commite3485cc2b3df1d61ffdd1aebc1b235a9aa8c62b7 (patch)
tree05da771a6f870421691deffd45fed21b519c78c4
parentdfec8bdfb728b8add4967725e90e3ccd3334b468 (diff)
downloadpoezio-e3485cc2b3df1d61ffdd1aebc1b235a9aa8c62b7.tar.gz
poezio-e3485cc2b3df1d61ffdd1aebc1b235a9aa8c62b7.tar.bz2
poezio-e3485cc2b3df1d61ffdd1aebc1b235a9aa8c62b7.tar.xz
poezio-e3485cc2b3df1d61ffdd1aebc1b235a9aa8c62b7.zip
Changed the check on an empty message because the earlier one might leave an empty body in XML representation.
-rw-r--r--poezio/mam.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/mam.py b/poezio/mam.py
index 163e6439..b5ef7206 100644
--- a/poezio/mam.py
+++ b/poezio/mam.py
@@ -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