# HG changeset patch # User Goffi # Date 1600334877 -7200 # Node ID 40794e658d6821cfaefedfdb2f54da4e8af13a49 # Parent 569f4cf7183b9ba9fa7241e10ddface404995c98 plugin XEP-0313: fix getting MAM archive when history is empty diff -r 569f4cf7183b -r 40794e658d68 sat/plugins/plugin_xep_0313.py --- a/sat/plugins/plugin_xep_0313.py Thu Sep 17 10:46:13 2020 +0200 +++ b/sat/plugins/plugin_xep_0313.py Thu Sep 17 11:27:57 2020 +0200 @@ -86,8 +86,9 @@ 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