diff options
author | Kim Alvefur <zash@zash.se> | 2021-10-20 17:31:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-10-20 17:31:24 +0200 |
commit | 8b769c373d076ea0a678680ef187f83cd0e7d19d (patch) | |
tree | 85dc8ecc0113c5126835a69e61948e2727f4ff08 /spec/scansion/pubsub_max_items.scs | |
parent | 4b05d0f2402475fea608fd3e48a96364bc6da4f2 (diff) | |
download | prosody-8b769c373d076ea0a678680ef187f83cd0e7d19d.tar.gz prosody-8b769c373d076ea0a678680ef187f83cd0e7d19d.zip |
mod_pubsub: Prevent max_items from being set to zero
Disable persistence instead if no items should be persisted.
XEP-0060 is not entirely clear on what either of those option really
mean.
Diffstat (limited to 'spec/scansion/pubsub_max_items.scs')
-rw-r--r-- | spec/scansion/pubsub_max_items.scs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/scansion/pubsub_max_items.scs b/spec/scansion/pubsub_max_items.scs index dafeb317..ae106edd 100644 --- a/spec/scansion/pubsub_max_items.scs +++ b/spec/scansion/pubsub_max_items.scs @@ -43,7 +43,9 @@ Alice receives: <field var="pubsub#description" label="Description" type="text-single"/> <field var="pubsub#type" label="The type of node data, usually specified by the namespace of the payload (if any)" type="text-single"/> <field var="pubsub#max_items" label="Max # of items to persist" type="text-single"> - <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/> + <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"> + <range min="1"/> + </validate> <value>20</value> </field> <field var="pubsub#persist_items" label="Persist items to storage" type="boolean"> |