Add docstring for _set_node_config
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
753c5de27c
commit
9096891e28
1 changed files with 16 additions and 0 deletions
|
@ -252,6 +252,20 @@ class XEP_0384(BasePlugin):
|
||||||
persist_items: bool = True,
|
persist_items: bool = True,
|
||||||
access_model: Optional[str] = None,
|
access_model: Optional[str] = None,
|
||||||
) -> asyncio.Future:
|
) -> 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 = Form()
|
||||||
form['type'] = 'submit'
|
form['type'] = 'submit'
|
||||||
form.add_field(
|
form.add_field(
|
||||||
|
@ -331,6 +345,8 @@ class XEP_0384(BasePlugin):
|
||||||
log.debug('The node we tried to publish was already '
|
log.debug('The node we tried to publish was already '
|
||||||
'existing with a different configuration. '
|
'existing with a different configuration. '
|
||||||
'Trying to configure manually..')
|
'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)
|
await self._set_node_config(OMEMO_BUNDLES_NS)
|
||||||
|
|
||||||
async def _fetch_bundle(self, jid: str, device_id: int) -> Optional[ExtendedPublicBundle]:
|
async def _fetch_bundle(self, jid: str, device_id: int) -> Optional[ExtendedPublicBundle]:
|
||||||
|
|
Loading…
Reference in a new issue