Mercurial > prosody-modules
annotate mod_mam/README.markdown @ 1820:8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 02 Sep 2015 17:30:33 +0200 |
parents | 3228fb928a93 |
children | 6234e67ebe7a |
rev | line source |
---|---|
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
1 --- |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
2 labels: |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
3 - 'Stage-Beta' |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
4 summary: 'XEP-0313: Message Archive Management' |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
5 ... |
1782 | 6 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
7 Introduction |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
8 ============ |
1782 | 9 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
10 Implementation of [XEP-0313: Message Archive |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
11 Management](http://xmpp.org/extensions/xep-0313.html). |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
12 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
13 Details |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
14 ======= |
1782 | 15 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
16 This module will archive all messages that match the simple rules setup |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
17 by the user, and allow the user to access this archive. |
1782 | 18 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
19 Usage |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
20 ===== |
1782 | 21 |
22 First copy the module to the prosody plugins directory. | |
23 | |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
24 Then add "mam" to your modules\_enabled list: |
1782 | 25 |
1820
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
26 ``` {.lua} |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
27 modules_enabled = { |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
28 -- ... |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
29 "mam", |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
30 -- ... |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
31 } |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
32 ``` |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
33 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
34 Storage backend |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
35 =============== |
1782 | 36 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
37 mod\_mam uses the store "archive2". See [Prosodys data storage |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
38 documentation](https://prosody.im/doc/storage) for information on how to |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
39 configure storage. |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
40 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
41 For example, to use mod\_storage\_sql2: |
1782 | 42 |
1820
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
43 ``` {.lua} |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
44 storage = { |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
45 archive2 = "sql2"; |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
46 } |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
47 ``` |
1801
5abf61915ab4
mod_mam/README: Add example of use with mod_storage_sql2
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
48 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
49 Configuration |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
50 ============= |
1782 | 51 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
52 The MAM protocol includes a method of changing preferences regarding |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
53 what messages should be stored. This allows users to enable or disable |
1782 | 54 archiving by default, and set rules for specific contacts. This module |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
55 will log no messages by default, for privacy concerns. If you decide to |
1782 | 56 change this, you should inform your users. |
57 | |
1820
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
58 ``` {.lua} |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
59 default_archive_policy = false -- other options are true or "roster"; |
8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
Kim Alvefur <zash@zash.se>
parents:
1804
diff
changeset
|
60 ``` |
1782 | 61 |
62 This controls what messages are archived if the user hasn't set a | |
63 matching rule, or another personal default. | |
64 | |
1804 | 65 ------------ ------------------------------------------------------ |
66 `false` Store no messages. This is the default. | |
67 `"roster"` Store messages to/from contacts in the users roster. | |
68 `true` Store all messages. | |
69 ------------ ------------------------------------------------------ | |
1782 | 70 |
1804 | 71 max_archive_query_results = 20; |
1782 | 72 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
73 This is the largest number of messages that are allowed to be retrieved |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
74 in one request. |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
75 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
76 Compatibility |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
77 ============= |
1782 | 78 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
79 ------- -------------------------------------------------------------------------------------- |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
80 trunk Works |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
81 0.10 Works, requires a storage driver with archive support, eg mod\_storage\_sql2 in 0.10 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
82 0.9 Unsupported |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
83 0.8 Does not work |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1801
diff
changeset
|
84 ------- -------------------------------------------------------------------------------------- |