Mercurial > prosody-modules
comparison mod_groups_internal/mod_groups_internal.lua @ 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 |
comparison
equal
deleted
inserted
replaced
4405:76d045f76f65 | 4406:d86592775a20 |
---|---|
166 return groups; | 166 return groups; |
167 end | 167 end |
168 | 168 |
169 function delete(group_id) | 169 function delete(group_id) |
170 if group_members_store:set(group_id, nil) then | 170 if group_members_store:set(group_id, nil) then |
171 info = get_info(group_id) | 171 local group_info = get_info(group_id) |
172 if info and info.muc_jid then | 172 if group_info and group_info.muc_jid then |
173 muc_host.delete_room(muc_host.get_room_from_jid(info.muc_jid)) | 173 muc_host.delete_room(muc_host.get_room_from_jid(group_info.muc_jid)) |
174 end | 174 end |
175 return group_info_store:set(group_id, nil); | 175 return group_info_store:set(group_id, nil); |
176 end | 176 end |
177 return nil, "internal-server-error"; | 177 return nil, "internal-server-error"; |
178 end | 178 end |