aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-09 15:58:49 +0200
committerKim Alvefur <zash@zash.se>2021-06-09 15:58:49 +0200
commitc880dee2af4b1f5e184c3a3c7f70036694d9c1f8 (patch)
treef0bcecd7be12b067e31e7aa05354fc17a2d9cc64 /spec
parent351a197fbdd99b11505c283ae8c3f414bee38885 (diff)
downloadprosody-c880dee2af4b1f5e184c3a3c7f70036694d9c1f8.tar.gz
prosody-c880dee2af4b1f5e184c3a3c7f70036694d9c1f8.zip
mod_pubsub,mod_pep: Support "max" as 'pubsub#max_items'
Fixes #1643 API change: The argument to archive_itemstore() changes type to integer
Diffstat (limited to 'spec')
-rw-r--r--spec/scansion/pep_pubsub_max.scs47
-rw-r--r--spec/scansion/pubsub_config.scs4
-rw-r--r--spec/scansion/pubsub_multi_items.scs2
-rw-r--r--spec/scansion/pubsub_preconditions.scs4
4 files changed, 52 insertions, 5 deletions
diff --git a/spec/scansion/pep_pubsub_max.scs b/spec/scansion/pep_pubsub_max.scs
new file mode 100644
index 00000000..6961304c
--- /dev/null
+++ b/spec/scansion/pep_pubsub_max.scs
@@ -0,0 +1,47 @@
+# PEP max_items=max
+
+[Client] Romeo
+ jid: pep-test-maxitems@localhost
+ password: password
+
+-----
+
+Romeo connects
+
+Romeo sends:
+ <iq type="set" id="pub">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub">
+ <publish node="urn:xmpp:microblog:0">
+ <item>
+ <entry xmlns='http://www.w3.org/2005/Atom'>
+ <title>Hello</title>
+ </entry>
+ </item>
+ </publish>
+ <publish-options>
+ <x xmlns="jabber:x:data" type="submit">
+ <field type="hidden" var="FORM_TYPE">
+ <value>http://jabber.org/protocol/pubsub#publish-options</value>
+ </field>
+ <field var="pubsub#persist_items">
+ <value>true</value>
+ </field>
+ <field var="pubsub#access_model">
+ <value>open</value>
+ </field>
+ <field var="pubsub#max_items">
+ <value>max</value>
+ </field>
+ </x>
+ </publish-options>
+ </pubsub>
+ </iq>
+
+Romeo receives:
+ <iq type="result" id="pub">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub">
+ <publish node="urn:xmpp:microblog:0">
+ <item id="{scansion:any}"/>
+ </publish>
+ </pubsub>
+ </iq>
diff --git a/spec/scansion/pubsub_config.scs b/spec/scansion/pubsub_config.scs
index d979aca5..2cad9115 100644
--- a/spec/scansion/pubsub_config.scs
+++ b/spec/scansion/pubsub_config.scs
@@ -48,7 +48,7 @@ Romeo 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="xs:integer"/>
+ <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/>
<value>1</value>
</field>
<field var="pubsub#persist_items" label="Persist items to storage" type="boolean">
@@ -124,7 +124,7 @@ Romeo sends:
<field var="pubsub#description" type="text-single" label="Description"/>
<field var="pubsub#type" type="text-single" label="The type of node data, usually specified by the namespace of the payload (if any)"/>
<field var="pubsub#max_items" type="text-single" label="Max # of items to persist">
- <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="xs:integer"/>
+ <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/>
<value>1</value>
</field>
<field var="pubsub#persist_items" type="boolean" label="Persist items to storage">
diff --git a/spec/scansion/pubsub_multi_items.scs b/spec/scansion/pubsub_multi_items.scs
index 147aaa8d..d76bc46c 100644
--- a/spec/scansion/pubsub_multi_items.scs
+++ b/spec/scansion/pubsub_multi_items.scs
@@ -43,7 +43,7 @@ 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="xs:integer"/>
+ <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/>
<value>20</value>
</field>
<field var="pubsub#persist_items" label="Persist items to storage" type="boolean">
diff --git a/spec/scansion/pubsub_preconditions.scs b/spec/scansion/pubsub_preconditions.scs
index 25afaa8d..7e4e593b 100644
--- a/spec/scansion/pubsub_preconditions.scs
+++ b/spec/scansion/pubsub_preconditions.scs
@@ -47,7 +47,7 @@ Romeo 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="xs:integer"/>
+ <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/>
<value>1</value>
</field>
<field var="pubsub#persist_items" label="Persist items to storage" type="boolean">
@@ -123,7 +123,7 @@ Romeo sends:
<field var="pubsub#description" type="text-single" label="Description"/>
<field var="pubsub#type" type="text-single" label="The type of node data, usually specified by the namespace of the payload (if any)"/>
<field var="pubsub#max_items" type="text-single" label="Max # of items to persist">
- <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="xs:integer"/>
+ <validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="pubsub:integer-or-max"/>
<value>1</value>
</field>
<field var="pubsub#persist_items" type="boolean" label="Persist items to storage">