diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 49957fe..1930369 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -252,6 +252,20 @@ class XEP_0384(BasePlugin): persist_items: bool = True, access_model: Optional[str] = None, ) -> asyncio.Future: + """ + Sets OMEMO devicelist or bundle node configuration. + + This function is meant to be used once we've tried publish options + and they came back with precondition-not-met. This means an + existing node is not using our defaults. + + This function will be overwriting pubsub#persist_items only, + leaving pubsub#access_model as it has already been set. + + To be complete, the code using this function should probably + set the bundle node to the same access_model as the devicelist + node. + """ form = Form() form['type'] = 'submit' form.add_field( @@ -331,6 +345,8 @@ class XEP_0384(BasePlugin): log.debug('The node we tried to publish was already ' 'existing with a different configuration. ' 'Trying to configure manually..') + # TODO: We should attempt setting this node to the same + # access_model as the devicelist node for completness. await self._set_node_config(OMEMO_BUNDLES_NS) async def _fetch_bundle(self, jid: str, device_id: int) -> Optional[ExtendedPublicBundle]: