comparison mod_map/README.markdown @ 3496:262e68821f3f

mod_map: Experimental module exposing MAM summary
author Kim Alvefur <zash@zash.se>
date Mon, 25 Feb 2019 15:52:46 +0100
parents
children d31fa28d9482
comparison
equal deleted inserted replaced
3495:5567098a7f91 3496:262e68821f3f
1 ---
2 labels:
3 - 'Stage-Experimental'
4 summary: Prototype MAM summary
5 ---
6
7 This is a prototype for an experimental archive summary API recently
8 added in [Prosody trunk](https://hg.prosody.im/trunk/rev/2c5546cc5c70).
9
10 # Protocol
11
12 ::: {.alert .alert-danger}
13 This is not a finished protocol, but a prototype meant for testing.
14 :::
15
16 A basic query:
17
18 ``` {.xml}
19 <iq id="lx7" type="get">
20 <summary xmlns="xmpp:prosody.im/mod_map"/>
21 </iq>
22 ```
23
24 Answered like:
25
26 ``` {.xml}
27 <?xml version="1.0"?>
28 <iq type="result" id="lx7">
29 <summary xmlns="xmpp:prosody.im/mod_map">
30 <item jid="juliet@capulet.lit">
31 <count>3</count>
32 </item>
33 </summary>
34 </iq>
35 ```
36
37 It can also take dataform and RSM parameters similar to a [filtered MAM
38 query](https://xmpp.org/extensions/xep-0313.html#filter).
39
40 E.g if the last message you received had an id `09af3-cc343-b409f` then
41 the following query would tell you who sent you messages since:
42
43 ``` {.xml}
44 <iq id="lx8" type="get">
45 <summary xmlns="xmpp:prosody.im/mod_map">
46 <set xmlns="http://jabber.org/protocol/rsm">
47 <max>10</max>
48 <after>09af3-cc343-b409f</after>
49 </set>
50 </summary>
51 </iq>
52 ```