Changeset

12156:17cffaa78f48

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
author Kim Alvefur <zash@zash.se>
date Sat, 08 Jan 2022 00:32:33 +0100
parents 12155:ae5988739990
children 12157:1dd9ee6112e9
files plugins/mod_bookmarks.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);