aboutsummaryrefslogtreecommitdiffstats
path: root/spec/scansion
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2019-12-19 10:03:16 +0000
committerMatthew Wild <mwild1@gmail.com>2019-12-19 10:03:16 +0000
commit173990157fad6d4507e8ce2dc214e7bf35a17822 (patch)
tree1d7cba4384d9413b605b7e06c729b3fb44dfa1fa /spec/scansion
parentad26a3b047ab0ae2efa0d61553e32f77da2ccac4 (diff)
downloadprosody-173990157fad6d4507e8ce2dc214e7bf35a17822.tar.gz
prosody-173990157fad6d4507e8ce2dc214e7bf35a17822.zip
rostermanager, mod_presence: Support for subscription preapproval (fixes #686)
Diffstat (limited to 'spec/scansion')
-rw-r--r--spec/scansion/presence_preapproval.scs74
1 files changed, 74 insertions, 0 deletions
diff --git a/spec/scansion/presence_preapproval.scs b/spec/scansion/presence_preapproval.scs
new file mode 100644
index 00000000..ce6158d2
--- /dev/null
+++ b/spec/scansion/presence_preapproval.scs
@@ -0,0 +1,74 @@
+# server supports contact subscription pre-approval (RFC 6121 3.4)
+
+[Client] Alice
+ jid: preappove-a@localhost
+ password: password
+
+[Client] Bob
+ jid: preapprove-b@localhost
+ password: password
+
+---------
+
+Alice connects
+
+Alice sends:
+ <presence/>
+
+Alice receives:
+ <presence/>
+
+Alice sends:
+ <presence to="${Bob's JID}" type="subscribed"/>
+
+Bob connects
+
+Bob sends:
+ <iq type="get" id="roster1">
+ <query xmlns="jabber:iq:roster"/>
+ </iq>
+
+Bob receives:
+ <iq type="result" id="roster1">
+ <query xmlns="jabber:iq:roster" ver="{scansion:any}">
+ </query>
+ </iq>
+
+Bob sends:
+ <presence/>
+
+Bob receives:
+ <presence from="${Bob's full JID}"/>
+
+Bob sends:
+ <presence to="${Alice's JID}" type="subscribe" />
+
+Bob receives:
+ <iq type='set' id='{scansion:any}'>
+ <query ver='1' xmlns='jabber:iq:roster'>
+ <item jid="${Alice's JID}" subscription='none' ask='subscribe' />
+ </query>
+ </iq>
+
+
+
+Bob receives:
+ <presence from="${Alice's JID}" type="subscribed" />
+
+Bob disconnects
+
+Alice sends:
+ <iq type="get" id="roster1">
+ <query xmlns="jabber:iq:roster"/>
+ </iq>
+
+Alice receives:
+ <iq type="result" id="roster1">
+ <query xmlns="jabber:iq:roster" ver="{scansion:any}">
+ <item jid="${Bob's JID}" subscription="from" />
+ </query>
+ </iq>
+
+Alice disconnects
+
+Bob disconnects