diff mod_bookmarks2/mod_bookmarks2.lua @ 3696:310061f6e1df

mod_bookmarks2: Fix traceback on updating from no legacy bookmarks to bookmarks 2.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Sep 2019 14:55:03 +0200
parents 7575399ae544
children 9cd6d602ad1b
line wrap: on
line diff
--- a/mod_bookmarks2/mod_bookmarks2.lua	Sun Oct 06 17:29:22 2019 +0200
+++ b/mod_bookmarks2/mod_bookmarks2.lua	Sat Sep 28 14:55:03 2019 +0200
@@ -215,7 +215,7 @@
 	if not data then
 		module:log("debug", "No existing legacy bookmarks for %s, migration already done: %s", jid, err);
 		local ok, ret = service:get_items("urn:xmpp:bookmarks:0", session.full_jid);
-		if not ok or #ret.tags == 0 then
+		if not ok or not ret then
 			module:log("debug", "Additionally, no bookmarks 2 were existing for %s, assuming empty.", jid);
 			module:fire_event("bookmarks/empty", { session = session });
 		end