Changeset

5849:791aa8072f58

mod_groups_muc_bookmarks: Don't add deleted MUCs to user bookmarks
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Jan 2024 18:21:08 +0000
parents 5848:865c77b5c6dc
children 5850:f76909ec1300
files mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Fri Jan 12 18:20:40 2024 +0000
+++ b/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua	Fri Jan 12 18:21:08 2024 +0000
@@ -85,7 +85,9 @@
 		inject_bookmark(jid, group_info.muc_jid, true, group_info.name);
 	elseif group_info.mucs then
 		for _, chat in ipairs(mod_groups.get_group_chats(event.id)) do
-			inject_bookmark(jid, chat.jid, true, chat.name);
+			if not chat.deleted then
+				inject_bookmark(jid, chat.jid, true, chat.name);
+			end
 		end
 	else
 		module:log("debug", "ignoring user added event on group %s because it has no MUCs", event.id)