summaryrefslogtreecommitdiff
path: root/poezio/mam.py
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-07-24 02:36:31 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-08-22 00:54:25 +0530
commitd6ccafbc966e72ae4ff266a67016114180f59be1 (patch)
tree92eae7a41c7e0f4876c6e77f34e34cd49bebf465 /poezio/mam.py
parent836e53bdfe9d6e5eb11543d143c0993f2aba4d31 (diff)
downloadpoezio-d6ccafbc966e72ae4ff266a67016114180f59be1.tar.gz
poezio-d6ccafbc966e72ae4ff266a67016114180f59be1.tar.bz2
poezio-d6ccafbc966e72ae4ff266a67016114180f59be1.tar.xz
poezio-d6ccafbc966e72ae4ff266a67016114180f59be1.zip
Added a check on empty messages and not displaying them in MAM query
Diffstat (limited to 'poezio/mam.py')
-rw-r--r--poezio/mam.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/mam.py b/poezio/mam.py
index b3145295..29efc8ff 100644
--- a/poezio/mam.py
+++ b/poezio/mam.py
@@ -70,7 +70,8 @@ async def query(self, remote_jid, start, end, top):
async for rsm in results:
if top:
for msg in rsm['mam']['results']:
- msgs.append(msg)
+ if msg['mam_result']['forwarded']['stanza']['body'] is not '':
+ msgs.append(msg)
if msg_count == 10:
self.query_id = 0
timestamp = datetime.now()