mod_bookmarks: Unhook PEP service objects on removal from cache
authorKim Alvefur <zash@zash.se>
Sat, 08 Jan 2022 00:30:26 +0100
changeset 12159 ae5988739990
parent 12158 760dd1fc3dc1
child 12160 17cffaa78f48
mod_bookmarks: Unhook PEP service objects on removal from cache See 1dc00ca6ee9d
plugins/mod_bookmarks.lua
--- a/plugins/mod_bookmarks.lua	Thu Jan 06 18:56:06 2022 +0100
+++ b/plugins/mod_bookmarks.lua	Sat Jan 08 00:30:26 2022 +0100
@@ -418,4 +418,7 @@
 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);