From fca70e17101991cff2efa29cd79a338aba833e33 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 17 Sep 2020 11:27:57 +0200 Subject: [PATCH] plugin XEP-0313: fix getting MAM archive when history is empty --- sat/plugins/plugin_xep_0313.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sat/plugins/plugin_xep_0313.py b/sat/plugins/plugin_xep_0313.py index d808272a..780cf0db 100644 --- a/sat/plugins/plugin_xep_0313.py +++ b/sat/plugins/plugin_xep_0313.py @@ -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