Mercurial > prosody-modules
annotate mod_auto_moved/tests/moved.scs @ 5256:44f7edd4f845
mod_http_oauth2: Reject non-local hosts in more code paths
We're not issuing tokens for users on remote hosts, we can't even
authenticate them since they're remote. Thus the host is always the
local module.host so no need to pass around the host in most cases or
use it for anything but enforcing the same host.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2023 17:52:10 +0100 |
parents | f95a1e197a07 |
children |
rev | line source |
---|---|
4679
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 # XEP-0283: Moved |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 [Client] Romeo |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 jid: romeo1@localhost |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 password: password |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 [Client] RomeoNew |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 jid: romeo.new@localhost |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 password: password |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 [Client] Juliet |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 jid: juliet.m@localhost |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 password: password |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 ----- |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 # The parties connect |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 Romeo connects |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 Romeo sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 <presence/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 <presence from="${Romeo's full JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 Juliet connects |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 Juliet sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 <presence/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 <presence from="${Juliet's full JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 RomeoNew connects |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 RomeoNew sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 <presence/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 RomeoNew receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 <presence from="${RomeoNew's full JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
42 # They add each other |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 Romeo sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 <presence type="subscribe" to="${Juliet's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
45 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 <presence from="${Juliet's JID}" to="${Romeo's JID}" type="unavailable"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
48 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
49 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
50 <presence type="subscribe" to="${Juliet's JID}" from="${Romeo's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
51 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
52 Juliet sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 <presence type="subscribed" to="${Romeo's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
56 <presence from="${Juliet's full JID}" to="${Romeo's JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 <delay xmlns="urn:xmpp:delay" stamp="{scansion:any}" from="localhost"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
58 </presence> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
59 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 Juliet sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 <presence type="subscribe" to="${Romeo's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
64 <presence from="${Romeo's JID}" to="${Juliet's JID}" type="unavailable"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
65 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
66 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
67 <presence type="subscribe" to="${Romeo's JID}" from="${Juliet's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
68 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
69 Romeo sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
70 <presence type="subscribed" to="${Juliet's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
71 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
72 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
73 <presence from="${Romeo's full JID}" to="${Juliet's JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
74 <delay xmlns="urn:xmpp:delay" stamp="{scansion:any}" from="localhost"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
75 </presence> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
76 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
77 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
78 <presence from="${Juliet's full JID}" to="${Romeo's JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
79 <delay xmlns="urn:xmpp:delay" stamp="{scansion:any}" from="localhost"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
80 </presence> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
81 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
82 # They request their rosters |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
83 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
84 Juliet sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
85 <iq type="get" id="roster1"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
86 <query xmlns='jabber:iq:roster'/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
87 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
88 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
89 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
90 <iq type="result" id="roster1"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
91 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
92 RomeoNew sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
93 <iq type="get" id="roster1"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
94 <query xmlns='jabber:iq:roster'/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
95 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
96 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
97 RomeoNew receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
98 <iq type="result" id="roster1"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
99 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
100 # They can now talk |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
101 Juliet sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
102 <message type="chat" to="${Romeo's JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
103 <body>ohai</body> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
104 </message> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
105 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
106 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
107 <message type="chat" to="${Romeo's JID}" from="${Juliet's full JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
108 <body>ohai</body> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
109 </message> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
110 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
111 # Romeo moves to a new account |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
112 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
113 # Romeo publishes a moved statement |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
114 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
115 Romeo sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
116 <iq type='set' id='pub1'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
117 <pubsub xmlns='http://jabber.org/protocol/pubsub'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
118 <publish node='urn:xmpp:moved:1'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
119 <item id='current'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
120 <moved xmlns='urn:xmpp:moved:1'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
121 <new-jid>${RomeoNew's JID}</new-jid> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
122 </moved> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
123 </item> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
124 </publish> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
125 <publish-options> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
126 <x xmlns='jabber:x:data' type='submit'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
127 <field var='FORM_TYPE' type='hidden'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
128 <value>http://jabber.org/protocol/pubsub#publish-options</value> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
129 </field> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
130 <field var='pubsub#access_model'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
131 <value>open</value> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
132 </field> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
133 </x> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
134 </publish-options> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
135 </pubsub> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
136 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
137 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
138 Romeo receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
139 <iq type="result" id="pub1"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
140 <pubsub xmlns='http://jabber.org/protocol/pubsub'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
141 <publish node='urn:xmpp:moved:1'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
142 <item id='current'/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
143 </publish> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
144 </pubsub> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
145 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
146 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
147 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
148 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
149 # RomeoNew sends moved notification to Juliet |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
150 RomeoNew sends: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
151 <presence type="subscribe" to="${Juliet's JID}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
152 <moved xmlns="urn:xmpp:moved:1"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
153 <old-jid>${Romeo's JID}</old-jid> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
154 </moved> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
155 </presence> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
156 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
157 RomeoNew receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
158 <iq type='set' id="{scansion:any}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
159 <query ver="{scansion:any}" xmlns='jabber:iq:roster'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
160 <item jid="${Juliet's JID}" subscription='none' ask='subscribe'/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
161 </query> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
162 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
163 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
164 # Juliet's server verifies and approves the subscription request |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
165 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
166 RomeoNew receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
167 <presence type="subscribed" from="${Juliet's JID}"/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
168 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
169 RomeoNew receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
170 <iq type='set' id="{scansion:any}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
171 <query ver="{scansion:any}" xmlns='jabber:iq:roster'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
172 <item jid="${Juliet's JID}" subscription='to' /> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
173 </query> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
174 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
175 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
176 # Juliet's server notifies her via a roster push |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
177 |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
178 Juliet receives: |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
179 <iq type="set" id="{scansion:any}"> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
180 <query xmlns='jabber:iq:roster' ver='{scansion:any}'> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
181 <item jid="${RomeoNew's JID}" subscription='from'/> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
182 </query> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
183 </iq> |
f95a1e197a07
mod_auto_moved: New module implementing XEP-0283 r0.2.0
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
184 |