# HG changeset patch # User Emmanuel Gil Peyrot # Date 1641333564 -3600 # Node ID 6e17df6bececf36f08f1b1d90edf053f4f2b671e # Parent cc17708ba777d66abd65ed6ef34bcb9d42b09fce mod_bookmarks2: Actually fix the right wrong codepath diff -r cc17708ba777 -r 6e17df6becec mod_bookmarks2/mod_bookmarks2.lua --- a/mod_bookmarks2/mod_bookmarks2.lua Tue Jan 04 22:57:06 2022 +0100 +++ b/mod_bookmarks2/mod_bookmarks2.lua Tue Jan 04 22:59:24 2022 +0100 @@ -82,13 +82,8 @@ local service = mod_pep.get_pep_service(username); local ok, ret = service:get_items(namespace, session.full_jid); if not ok then - if ret == "item-not-found" then - module:log("debug", "Got no PEP bookmarks item for %s, returning empty legacy PEP bookmarks", jid); - session.send(st.reply(stanza):add_child(query)); - else - module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); - session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP")); - end + module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); + session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP")); return true; end @@ -122,8 +117,13 @@ 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); - session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP")); + if ret == "item-not-found" then + module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid); + session.send(st.reply(stanza):add_child(query)); + else + module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); + session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP")); + end return true; end