blob: 2c6840df47398c19b93978a7e8a13046f8e8e477 (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
# MAM 0.7.x Extended features
[Client] Romeo
jid: extmamtester@localhost
password: password
---------
Romeo connects
# Enable MAM so we can save some messages
Romeo sends:
<iq type="set" id="enablemam">
<prefs xmlns="urn:xmpp:mam:2" default="always">
<always/>
<never/>
</prefs>
</iq>
Romeo receives:
<iq type="result" id="enablemam">
<prefs xmlns="urn:xmpp:mam:2" default="always">
<always/>
<never/>
</prefs>
</iq>
# Some messages to look for later
Romeo sends:
<message to="someone@localhost" type="chat" id="chat01">
<body>Hello</body>
</message>
Romeo sends:
<message to="someone@localhost" type="chat" id="chat02">
<body>U there?</body>
</message>
# Metadata
Romeo sends:
<iq type="get" id="mamextmeta">
<metadata xmlns="urn:xmpp:mam:2"/>
</iq>
Romeo receives:
<iq type="result" id="mamextmeta">
<metadata xmlns="urn:xmpp:mam:2">
<start timestamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:mam:2" id="{scansion:any}"/>
<end timestamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:mam:2" id="{scansion:any}"/>
</metadata>
</iq>
Romeo sends:
<iq type="set" id="mamquery1">
<query xmlns="urn:xmpp:mam:2" queryid="q1"/>
</iq>
Romeo receives:
<message to="${Romeo's full JID}">
<result xmlns="urn:xmpp:mam:2" queryid="q1" id="{scansion:any}">
<forwarded xmlns="urn:xmpp:forward:0">
<delay stamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:delay"/>
<message to="someone@localhost" xmlns="jabber:client" type="chat" xml:lang="en" id="chat01" from="${Romeo's full JID}">
<body>Hello</body>
</message>
</forwarded>
</result>
</message>
Romeo receives:
<message to="${Romeo's full JID}">
<result xmlns="urn:xmpp:mam:2" queryid="q1" id="{scansion:any}">
<forwarded xmlns="urn:xmpp:forward:0">
<delay stamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:delay"/>
<message to="someone@localhost" xmlns="jabber:client" type="chat" xml:lang="en" id="chat02" from="${Romeo's full JID}">
<body>U there?</body>
</message>
</forwarded>
</result>
</message>
# FIXME unstable tag order from util.rsm
Romeo receives:
<iq type="result" id="mamquery1" to="${Romeo's full JID}">
<fin xmlns="urn:xmpp:mam:2" complete="true" scansion:strict="false">
</fin>
</iq>
# Get results in reverse order
Romeo sends:
<iq type="set" id="mamquery2">
<query xmlns="urn:xmpp:mam:2" queryid="q1">
<flip-page/>
</query>
</iq>
Romeo receives:
<message to="${Romeo's full JID}">
<result xmlns="urn:xmpp:mam:2" queryid="q1" id="{scansion:any}">
<forwarded xmlns="urn:xmpp:forward:0">
<delay stamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:delay"/>
<message to="someone@localhost" xmlns="jabber:client" type="chat" xml:lang="en" id="chat02" from="${Romeo's full JID}">
<body>U there?</body>
</message>
</forwarded>
</result>
</message>
Romeo receives:
<message to="${Romeo's full JID}">
<result xmlns="urn:xmpp:mam:2" queryid="q1" id="{scansion:any}">
<forwarded xmlns="urn:xmpp:forward:0">
<delay stamp="2008-08-22T21:09:04Z" xmlns="urn:xmpp:delay"/>
<message to="someone@localhost" xmlns="jabber:client" type="chat" xml:lang="en" id="chat01" from="${Romeo's full JID}">
<body>Hello</body>
</message>
</forwarded>
</result>
</message>
# FIXME unstable tag order from util.rsm
Romeo receives:
<iq type="result" id="mamquery2" to="${Romeo's full JID}">
<fin xmlns="urn:xmpp:mam:2" complete="true" scansion:strict="false">
</fin>
</iq>
|