Software /
code /
prosody-modules
Changeset
3678:7575399ae544
mod_bookmarks, mod_bookmarks2: Refuse to load if the other one is also loaded.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 28 Sep 2019 14:46:18 +0200 |
parents | 3677:90f88a643973 |
children | 3679:f9a93d7b6c50 |
files | mod_bookmarks/mod_bookmarks.lua mod_bookmarks2/mod_bookmarks2.lua |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_bookmarks/mod_bookmarks.lua Sat Sep 28 14:27:13 2019 +0200 +++ b/mod_bookmarks/mod_bookmarks.lua Sat Sep 28 14:46:18 2019 +0200 @@ -1,3 +1,8 @@ +local mm = require "core.modulemanager"; +if mm.get_modules_for_host(module.host):contains("bookmarks2") then + error("mod_bookmarks and mod_bookmarks2 are conflicting, please disable one of them.", 0); +end + local st = require "util.stanza"; local jid_split = require "util.jid".split;
--- a/mod_bookmarks2/mod_bookmarks2.lua Sat Sep 28 14:27:13 2019 +0200 +++ b/mod_bookmarks2/mod_bookmarks2.lua Sat Sep 28 14:46:18 2019 +0200 @@ -1,3 +1,8 @@ +local mm = require "core.modulemanager"; +if mm.get_modules_for_host(module.host):contains("bookmarks") then + error("mod_bookmarks2 and mod_bookmarks are conflicting, please disable one of them.", 0); +end + local st = require "util.stanza"; local jid_split = require "util.jid".split; @@ -9,6 +14,7 @@ local default_options = { ["persist_items"] = true; + -- This should be much higher, the XEP recommends 10000 but mod_pep rejects that. ["max_items"] = 255; ["send_last_published_item"] = "never"; ["access_model"] = "whitelist";