Mercurial > prosody-modules
comparison mod_mam/README.markdown @ 1835:6234e67ebe7a
mod_mam/README: Reorganise config options under sub-headings and rewrite description of options
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 09 Sep 2015 15:27:31 +0200 |
parents | 8de50be756e5 |
children | cd36e5bf00b3 |
comparison
equal
deleted
inserted
replaced
1834:7bb2f149f8ec | 1835:6234e67ebe7a |
---|---|
29 "mam", | 29 "mam", |
30 -- ... | 30 -- ... |
31 } | 31 } |
32 ``` | 32 ``` |
33 | 33 |
34 Configuration | |
35 ============= | |
36 | |
34 Storage backend | 37 Storage backend |
35 =============== | 38 --------------- |
36 | 39 |
37 mod\_mam uses the store "archive2". See [Prosodys data storage | 40 mod\_mam uses the store "archive2"[^1]. See [Prosodys data storage |
38 documentation](https://prosody.im/doc/storage) for information on how to | 41 documentation](https://prosody.im/doc/storage) for information on how to |
39 configure storage. | 42 configure storage. |
40 | 43 |
41 For example, to use mod\_storage\_sql2: | 44 For example, to use mod\_storage\_sql2[^2]: |
42 | 45 |
43 ``` {.lua} | 46 ``` {.lua} |
44 storage = { | 47 storage = { |
45 archive2 = "sql2"; | 48 archive2 = "sql2"; |
46 } | 49 } |
47 ``` | 50 ``` |
48 | 51 |
49 Configuration | 52 Query size limits |
50 ============= | 53 ----------------- |
51 | |
52 The MAM protocol includes a method of changing preferences regarding | |
53 what messages should be stored. This allows users to enable or disable | |
54 archiving by default, and set rules for specific contacts. This module | |
55 will log no messages by default, for privacy concerns. If you decide to | |
56 change this, you should inform your users. | |
57 | |
58 ``` {.lua} | |
59 default_archive_policy = false -- other options are true or "roster"; | |
60 ``` | |
61 | |
62 This controls what messages are archived if the user hasn't set a | |
63 matching rule, or another personal default. | |
64 | |
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 ------------ ------------------------------------------------------ | |
70 | 54 |
71 max_archive_query_results = 20; | 55 max_archive_query_results = 20; |
72 | 56 |
73 This is the largest number of messages that are allowed to be retrieved | 57 This is the largest number of messages that are allowed to be retrieved |
74 in one request. | 58 in one request *page*. A query that does not fit in one page will |
59 include a reference to the next page, letting clients page through the | |
60 result set. Setting large number is not recomended, as Prosody will be | |
61 blocked while processing the request and will not be able to do anything | |
62 else. | |
63 | |
64 Message matching policy | |
65 ----------------------- | |
66 | |
67 The MAM protocol includes a way for clients to control what messages | |
68 should be stored. This allows users to enable or disable archiving by | |
69 default or for specific contacts. This module will log no messages by | |
70 default, for privacy concerns. If you decide to change this, you should | |
71 inform your users. | |
72 | |
73 ``` {.lua} | |
74 default_archive_policy = false | |
75 ``` | |
76 | |
77 `default_archive_policy =` Meaning | |
78 ---------------------------- ------------------------------------------------------ | |
79 `false` Store no messages. This is the default. | |
80 `"roster"` Store messages to/from contacts in the users roster. | |
81 `true` Store all messages. | |
75 | 82 |
76 Compatibility | 83 Compatibility |
77 ============= | 84 ============= |
78 | 85 |
79 ------- -------------------------------------------------------------------------------------- | 86 ------- --------------- |
80 trunk Works | 87 trunk Works |
81 0.10 Works, requires a storage driver with archive support, eg mod\_storage\_sql2 in 0.10 | 88 0.10 Works [^3] |
82 0.9 Unsupported | 89 0.9 Unsupported |
83 0.8 Does not work | 90 0.8 Does not work |
84 ------- -------------------------------------------------------------------------------------- | 91 ------- --------------- |
92 | |
93 [^1]: Might be changed to "mam" at some point | |
94 | |
95 [^2]: mod\_storage\_sql2 will replace mod\_storage\_sql at some point | |
96 | |
97 [^3]: requires a storage driver with archive support, eg | |
98 mod\_storage\_sql2 in 0.10 |