Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
f532ff35 by lovetox at 2021-07-24T21:09:34+02:00
Correctly handle RSM count request
Fixes #120
- - - - -
1 changed file:
- nbxmpp/modules/mam.py
Changes:
=====================================
nbxmpp/modules/mam.py
=====================================
@@ -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: https://xmpp.org/extensions/xep-0059.html#count
if rsm.first is None or rsm.last is None:
raise MalformedStanzaError('first or last element missing',
response)
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f532ff354c461e6606162489428297375f5e8274
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f532ff354c461e6606162489428297375f5e8274
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits