changeset 4406:d86592775a20

mod_groups_internal: Fix unintended global variable (thanks luacheck)
author Matthew Wild <mwild1@gmail.com>
date Wed, 27 Jan 2021 15:13:18 +0000
parents 76d045f76f65
children 105586ca9a79
files mod_groups_internal/mod_groups_internal.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_groups_internal/mod_groups_internal.lua	Wed Jan 27 14:55:55 2021 +0000
+++ b/mod_groups_internal/mod_groups_internal.lua	Wed Jan 27 15:13:18 2021 +0000
@@ -168,9 +168,9 @@
 
 function delete(group_id)
 	if group_members_store:set(group_id, nil) then
-		info = get_info(group_id)
-		if info and info.muc_jid then
-			muc_host.delete_room(muc_host.get_room_from_jid(info.muc_jid))
+		local group_info = get_info(group_id)
+		if group_info and group_info.muc_jid then
+			muc_host.delete_room(muc_host.get_room_from_jid(group_info.muc_jid))
 		end
 		return group_info_store:set(group_id, nil);
 	end