Comparison

mod_bookmarks2/mod_bookmarks2.lua @ 4844:cc17708ba777

mod_bookmarks2: Remove wrong codepath (thanks luacheck!)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 04 Jan 2022 22:57:06 +0100
parent 4839:797b51043767
child 4845:6e17df6becec
comparison
equal deleted inserted replaced
4843:60887967b797 4844:cc17708ba777
120 local username = session.username; 120 local username = session.username;
121 local jid = username.."@"..session.host; 121 local jid = username.."@"..session.host;
122 local service = mod_pep.get_pep_service(username); 122 local service = mod_pep.get_pep_service(username);
123 local ok, ret = service:get_items(namespace, session.full_jid); 123 local ok, ret = service:get_items(namespace, session.full_jid);
124 if not ok then 124 if not ok then
125 if ret == "item-not-found" then 125 module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret);
126 module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid); 126 session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP"));
127 session.send(st.reply(stanza):add_child(query));
128 else
129 module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret);
130 session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP"));
131 end
132 return true; 127 return true;
133 end 128 end
134 129
135 local storage = generate_legacy_storage(ret); 130 local storage = generate_legacy_storage(ret);
136 131