plugin XEP-0313: fix getting MAM archive when history is empty

This commit is contained in:
Goffi 2020-09-17 11:27:57 +02:00
commit fca70e1710

View file

@ -86,8 +86,9 @@ class XEP_0313(object):
profile=client.profile)
if not last_mess:
log.info(_("It seems that we have no MAM history yet"))
return
stanza_id = last_mess[0][-1]['stanza_id']
stanza_id = None
else:
stanza_id = last_mess[0][-1]['stanza_id']
rsm_req = rsm.RSMRequest(max_=100, after=stanza_id)
mam_req = mam.MAMRequest(rsm_=rsm_req)
complete = False