aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-10 00:13:17 +0100
committerKim Alvefur <zash@zash.se>2022-01-10 00:13:17 +0100
commit125249a32245fae805e779976f3737103269e0a6 (patch)
treef0eb13cf95bccfbc93d8d581d76de41c8c1eb550 /plugins
parent939e49685cc2f7b2c484d1bd770ca077c0aa731c (diff)
downloadprosody-125249a32245fae805e779976f3737103269e0a6.tar.gz
prosody-125249a32245fae805e779976f3737103269e0a6.zip
mod_bookmarks: Skip migration of legacy data when empty
Should save some cycles and not log the debug message on every login.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bookmarks.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_bookmarks.lua b/plugins/mod_bookmarks.lua
index 10c1abd1..fc37f09a 100644
--- a/plugins/mod_bookmarks.lua
+++ b/plugins/mod_bookmarks.lua
@@ -335,7 +335,7 @@ local function migrate_legacy_bookmarks(event)
local jid = username.."@"..session.host;
local ok, ret = service:get_items(namespace_legacy, session.full_jid);
- if ok then
+ if ok and ret[1] then
module:log("debug", "Legacy PEP bookmarks found for %s, migrating.", jid);
local failed = false;
for _, item_id in ipairs(ret) do