mod_bookmarks: Add option for disabling upgrade of legacy bookmarks
authorKim Alvefur <zash@zash.se>
Sat, 08 Jan 2022 00:32:33 +0100
changeset 12160 17cffaa78f48
parent 12159 ae5988739990
child 12161 1dd9ee6112e9
mod_bookmarks: Add option for disabling upgrade of legacy bookmarks Might be nice to reduce amount of things happening on connect once all users has upgraded
plugins/mod_bookmarks.lua
--- a/plugins/mod_bookmarks.lua	Sat Jan 08 00:30:26 2022 +0100
+++ b/plugins/mod_bookmarks.lua	Sat Jan 08 00:32:33 2022 +0100
@@ -414,7 +414,9 @@
 		return on_publish_legacy_pep(event);
 	end
 end, 1);
-module:hook("resource-bind", migrate_legacy_bookmarks);
+if module:get_option_boolean("upgrade_legacy_bookmarks", true) then
+	module:hook("resource-bind", migrate_legacy_bookmarks);
+end
 module:handle_items("pep-service", function (event)
 	local service = event.item.service;
 	module:hook_object_event(service.events, "node-created", on_node_created);