diff mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua @ 4863:fdf50c4d23a3

mod_groups_muc_bookmarks: restore bookmark injection on empty store
author Jonas Schäfer <jonas@wielicki.name>
date Sun, 09 Jan 2022 18:20:28 +0100
parents 9a8a43d0faed
children d5ff386dc97f
line wrap: on
line diff
--- a/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Sun Jan 09 18:20:02 2022 +0100
+++ b/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Sun Jan 09 18:20:28 2022 +0100
@@ -17,7 +17,13 @@
 
 local function get_current_bookmarks(jid, service)
 	local ok, items = service:get_items(XMLNS_BM2, jid)
-	if not ok then return nil, items; end
+	if not ok then
+		if items == "item-not-found" then
+			return {}, nil;
+		else
+			return nil, items;
+		end
+	end
 	return items or {};
 end