Changeset

5843:742142f9771e

mod_groups_internal: Fix traceback when room doesn't exist I'm not sure if it should even be included if it doesn't exist, but I'm not currently sure how this situation occurs, so I'm implementing the lightest possible fix for now.
author Matthew Wild <mwild1@gmail.com>
date Thu, 11 Jan 2024 15:53:18 +0000
parents 5842:bb51cf204dd4
children 5844:c9279845fc41
files mod_groups_internal/mod_groups_internal.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_groups_internal/mod_groups_internal.lua	Tue Jan 09 13:50:18 2024 +0000
+++ b/mod_groups_internal/mod_groups_internal.lua	Thu Jan 11 15:53:18 2024 +0000
@@ -422,10 +422,11 @@
 	end
 
 	return array.map(mucs, function (muc_jid)
+		local room = muc_host.get_room_from_jid(muc_jid);
 		return {
 			id = jid.node(muc_jid);
 			jid = muc_jid;
-			name = muc_host.get_room_from_jid(muc_jid):get_name() or group_info.name;
+			name = room and room:get_name() or group_info.name;
 		};
 	end);
 end