Mercurial > prosody-modules
comparison mod_bookmarks2/mod_bookmarks2.lua @ 4688:05725276fac0
mod_bookmarks2: Use same default as mod_pep for max_items
Should fix the issue with max items until the proper "max" can be used,
by following the configured max.
While "max" is already in trunk, it's not easily usable in 0.11.x
This limit and option was added to mod_pep in Prosody rev aefb96a52f5f
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 15 Sep 2021 17:39:37 +0200 |
parents | d835cb7d2b47 |
children | 5a06c711649c |
comparison
equal
deleted
inserted
replaced
4687:41ddb782320c | 4688:05725276fac0 |
---|---|
12 local namespace = "urn:xmpp:bookmarks:1"; | 12 local namespace = "urn:xmpp:bookmarks:1"; |
13 | 13 |
14 local default_options = { | 14 local default_options = { |
15 ["persist_items"] = true; | 15 ["persist_items"] = true; |
16 -- This should be much higher, the XEP recommends 10000 but mod_pep rejects that. | 16 -- This should be much higher, the XEP recommends 10000 but mod_pep rejects that. |
17 ["max_items"] = 255; | 17 ["max_items"] = module:get_option_number("pep_max_items", 256); |
18 ["send_last_published_item"] = "never"; | 18 ["send_last_published_item"] = "never"; |
19 ["access_model"] = "whitelist"; | 19 ["access_model"] = "whitelist"; |
20 }; | 20 }; |
21 | 21 |
22 module:hook("account-disco-info", function (event) | 22 module:hook("account-disco-info", function (event) |