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

Correctly handle RSM count request

Fixes #120
parent 61bff9bd
Pipeline #8033 passed with stages
in 4 minutes and 49 seconds
......@@ -66,7 +66,10 @@ class MAM(BaseModule):
raise MalformedStanzaError('rsm set missing', response)
complete = fin.getAttr('complete') == 'true'
if not complete:
if max_ != 0 and not complete:
# max_ == 0 is a request for count of the items in a result set
# in this case first and last will be absent
# See:
if rsm.first is None or rsm.last is None:
raise MalformedStanzaError('first or last element missing',
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