# HG changeset patch # User Emmanuel Gil Peyrot # Date 1569674778 -7200 # Node ID 7575399ae544637b452a6543c9ee22afb9870b14 # Parent 90f88a643973038f1f5d8e8a0e5f1736bdd75f18 mod_bookmarks, mod_bookmarks2: Refuse to load if the other one is also loaded. diff -r 90f88a643973 -r 7575399ae544 mod_bookmarks/mod_bookmarks.lua --- 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; diff -r 90f88a643973 -r 7575399ae544 mod_bookmarks2/mod_bookmarks2.lua --- 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";