plugins/mod_bookmarks.lua
branch0.12
changeset 12597 1832b6c9c6ed
parent 12263 57792ed670e7
child 12981 74b9e05af71e
--- a/plugins/mod_bookmarks.lua	Tue Jul 26 00:39:16 2022 +0200
+++ b/plugins/mod_bookmarks.lua	Tue Jul 26 23:44:33 2022 +0200
@@ -87,7 +87,11 @@
 	local service = mod_pep.get_pep_service(username);
 	local ok, ret = service:get_items(namespace, session.full_jid);
 	if not ok then
-		module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret);
+		if ret == "item-not-found" then
+			module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid);
+		else
+			module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret);
+		end
 		session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrieve bookmarks from PEP"));
 		return true;
 	end