Add docstring for _set_node_config

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent 753c5de2
......@@ -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
form = Form()
form['type'] = 'submit'
......@@ -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]:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment