mod_bookmarks: Unhook PEP service objects on removal from cache

See 1dc00ca6ee9d
This commit is contained in:
Kim Alvefur 2022-01-08 00:30:26 +01:00
parent d3bd9f9be5
commit 1fa49be063

View file

@ -418,4 +418,7 @@ module:hook("resource-bind", migrate_legacy_bookmarks);
module:handle_items("pep-service", function (event)
local service = event.item.service;
module:hook_object_event(service.events, "node-created", on_node_created);
end, function () end, true);
end, function (event)
local service = event.item.service;
module:unhook_object_event(service.events, "node-created", on_node_created);
end, true);