Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0045.py @ 2723:c6be5962752d
plugin XEP-0045: request 50 *last* MAM messages if new archive
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 12 Dec 2018 01:13:15 +0100 |
parents | bb6adaa580ee |
children | 35a0ab3032bb |
comparison
equal
deleted
inserted
replaced
2722:14e1db0c1383 | 2723:c6be5962752d |
---|---|
874 else: | 874 else: |
875 log.info(u"We have no MAM archive for room {room_jid}.".format( | 875 log.info(u"We have no MAM archive for room {room_jid}.".format( |
876 room_jid=room_jid)) | 876 room_jid=room_jid)) |
877 # we don't want the whole archive if we have no archive yet | 877 # we don't want the whole archive if we have no archive yet |
878 # as it can be huge | 878 # as it can be huge |
879 rsm_req = rsm.RSMRequest(max_=50) | 879 rsm_req = rsm.RSMRequest(max_=50, before=u'') |
880 | 880 |
881 mam_req = mam.MAMRequest(rsm_=rsm_req) | 881 mam_req = mam.MAMRequest(rsm_=rsm_req) |
882 complete = False | 882 complete = False |
883 count = 0 | 883 count = 0 |
884 while not complete: | 884 while not complete: |