changeset 3544:7893115bf382

mod_bookmarks: Return true when a stanza has been sent.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 02 Apr 2019 16:41:07 +0200
parents 11629f04ddd0
children c1d7e6752d18
files mod_bookmarks/mod_bookmarks.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_bookmarks/mod_bookmarks.lua	Tue Apr 02 16:22:40 2019 +0200
+++ b/mod_bookmarks/mod_bookmarks.lua	Tue Apr 02 16:41:07 2019 +0200
@@ -39,12 +39,12 @@
 			module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, id);
 			session.send(st.error_reply(stanza, "cancel", "internal-server-error", "Failed to retrive bookmarks from PEP"));
 		end
-		return;
+		return true;
 	end
 	if not id or not item then
 		module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid);
 		session.send(st.reply(stanza):add_child(query));
-		return
+		return true;
 	end
 	module:log("debug", "Got item %s: %s", id, item);
 
@@ -79,7 +79,7 @@
 	if not ok then
 		module:log("error", "Failed to publish to PEP bookmarks for %s@%s: %s", session.username, session.host, err);
 		session.send(st.error_reply(stanza, "cancel", "internal-server-error", "Failed to store bookmarks to PEP"));
-		return;
+		return true;
 	end
 
 	session.send(st.reply(stanza));