Always publish on session_start

The condition wasn't necessary in session_start for PEP nodes not to be
published multiple times.

This also fixes the fact that we weren't publishing on reconnect.

And also fixes one indentation level too many in the _initial_publish
method.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-07-14 12:32:36 +02:00
parent fbe5e36c3e
commit aa54f58649

View file

@ -265,10 +265,10 @@ class XEP_0384(BasePlugin):
self.xmpp['xep_0163'].remove_interest(OMEMO_DEVICES_NS) self.xmpp['xep_0163'].remove_interest(OMEMO_DEVICES_NS)
async def session_start(self, _jid): async def session_start(self, _jid):
if self.backend_loaded and not self._initial_publish_done: await self._initial_publish()
await self._initial_publish()
async def _initial_publish(self): async def _initial_publish(self):
if self.backend_loaded:
self.xmpp['xep_0163'].add_interest(OMEMO_DEVICES_NS) self.xmpp['xep_0163'].add_interest(OMEMO_DEVICES_NS)
await asyncio.wait([ await asyncio.wait([
self._set_device_list(), self._set_device_list(),