Software /
code /
prosody
Diff
plugins/mod_bookmarks.lua @ 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 |
parent | 12155:ae5988739990 |
child | 12170:750abaf99baf |
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);