Commit 852b29d8 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

MAM: Check for first and last element in IQ result

parent d8b35aca
......@@ -119,6 +119,12 @@ class MAM(BaseModule):
'rsm set missing')
complete = fin.getAttr('complete') == 'true'
if not complete:
if rsm.first is None or rsm.last is None:
return raise_error(self._log.warning,
stanza,
'stanza-malformed',
'missing first or last element')
return MAMQueryData(jid=jid,
complete=complete,
......
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