aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/mod_pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-09 02:08:41 +0200
committerKim Alvefur <zash@zash.se>2017-10-09 02:08:41 +0200
commit6e5c3bd41ff1cf52a934c8163cb874b148244e20 (patch)
treea139d57dba091a4059dada6b49deeee429567772 /plugins/mod_pubsub/mod_pubsub.lua
parentd960ca7d6b76d9de4dfc38bd578b5fda92bcddf0 (diff)
downloadprosody-6e5c3bd41ff1cf52a934c8163cb874b148244e20.tar.gz
prosody-6e5c3bd41ff1cf52a934c8163cb874b148244e20.zip
mod_pubsub: Hide item persistence behind option (at least until affiliations are also persisted)
Diffstat (limited to 'plugins/mod_pubsub/mod_pubsub.lua')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 7f45adf7..6e3854ee 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -12,6 +12,8 @@ local autocreate_on_subscribe = module:get_option_boolean("autocreate_on_subscri
local pubsub_disco_name = module:get_option_string("name", "Prosody PubSub Service");
local expose_publisher = module:get_option_boolean("expose_publisher", false)
+local enable_persistence = module:get_option_boolean("experimental_pubsub_item_persistence", false);
+
local service;
local lib_pubsub = module:require "pubsub";
@@ -41,6 +43,13 @@ local function simple_itemstore(config, node)
return lib_pubsub.simple_itemstore(archive, config, nil, node, expose_publisher);
end
+if enable_persistence then
+ module:log("warn", "Item persistence is an experimental feature. Note that ownership information is lost on restart.")
+else
+ simple_itemstore = nil;
+end
+
+
function simple_broadcast(kind, node, jids, item, actor)
if item then
item = st.clone(item);