mod_groups_muc_bookmarks: handle removal of accounts without bookmarks
authorJonas Schäfer <jonas@wielicki.name>
Sat, 12 Jun 2021 15:29:53 +0200
changeset 4590 240fa534f586
parent 4589 05c74210c007
child 4591 0105df2138ff
mod_groups_muc_bookmarks: handle removal of accounts without bookmarks Otherwise, nil ensues.
mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua
--- a/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Sat Jun 12 14:47:06 2021 +0200
+++ b/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Sat Jun 12 15:29:53 2021 +0200
@@ -91,6 +91,9 @@
 
 	autojoin = autojoin or false and true
 	local current = get_current_bookmarks(jid, pep_service)
+	if not current then
+		return
+	end
 	current:maptags(function (node)
 		if node.attr.xmlns and node.attr.xmlns ~= XMLNS_XEP0048 then
 			return node