blob: ce6158d2db58991d4fcd0dd4a6969a8fdd06553e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
|