# HG changeset patch # User Goffi # Date 1678465365 -3600 # Node ID 5245b675f7adc7f18811333012e8d4f72c3aa0b8 # Parent 32d714a8ea5104667d246aef9c159ab6c43801b6 plugin XEP-0313: don't wait for MAM to be retrieved in connection workflow: MAM retrieval can be long, and can be done after connection, message just need to be sorted when being inserted (i.e. frontends must do insort). To avoid blocking connection for too long and result in bad UX and timeout risk, one2one MAM message are not retrieved in background. diff -r 32d714a8ea51 -r 5245b675f7ad sat/plugins/plugin_xep_0313.py --- a/sat/plugins/plugin_xep_0313.py Fri Mar 10 17:22:41 2023 +0100 +++ b/sat/plugins/plugin_xep_0313.py Fri Mar 10 17:22:45 2023 +0100 @@ -159,8 +159,8 @@ log.info(_("We have received {num_mess} message(s) while offline.") .format(num_mess=count)) - async def profileConnected(self, client): - await self.resume(client) + def profileConnected(self, client): + defer.ensureDeferred(self.resume(client)) def getHandler(self, client): mam_client = client._mam = SatMAMClient(self)