Assign True to the 'before' tag if it's value is None (eg:at the start no msg is there in the group, so no stanza-id)

This commit is contained in:
root 2019-08-23 04:25:16 +05:30
parent 2249d878d1
commit dd8ac8fc87

View file

@ -79,6 +79,8 @@ class ResultIterator:
""" """
if self._stop: if self._stop:
raise StopAsyncIteration raise StopAsyncIteration
if self.query[self.interface]['rsm']['before'] is None:
self.query[self.interface]['rsm']['before'] = self.reverse
self.query['id'] = self.query.stream.new_id() self.query['id'] = self.query.stream.new_id()
self.query[self.interface]['rsm']['max'] = str(self.amount) self.query[self.interface]['rsm']['max'] = str(self.amount)