plugin list: set overwrite_policy to any_publisher for grocery list

This commit is contained in:
Goffi 2021-02-27 18:33:53 +01:00
commit e60d563d27

View file

@ -492,8 +492,12 @@ class PubsubLists:
service = client.jid.userhostJID()
node = self._s.getSubmittedNS(f"{APP_NS_TICKETS}_{name}")
options = {
self._p.OPT_ACCESS_MODEL: access_model
self._p.OPT_ACCESS_MODEL: access_model,
}
if template_id == "grocery":
# for grocery list, we want all publishers to be able to set all items
# XXX: should node options be in TEMPLATE?
options[self._p.OPT_OVERWRITE_POLICY] = self._p.OWPOL_ANY_PUB
await self._p.createNode(client, service, node, options)
await self._s.setSchema(client, service, node, schema)
list_elt = domish.Element((APP_NS_TICKETS, "list"))