Software /
code /
prosody-modules
Changeset
4031:b2a6e163a6b4
mod_adhoc_groups: Fix check for error on group creation
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 20 May 2020 17:24:57 +0200 |
parents | 4030:0d7293c37e1a |
children | 4032:787fc3030087 |
files | mod_adhoc_groups/mod_adhoc_groups.lua |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_adhoc_groups/mod_adhoc_groups.lua Wed May 20 17:25:59 2020 +0200 +++ b/mod_adhoc_groups/mod_adhoc_groups.lua Wed May 20 17:24:57 2020 +0200 @@ -90,11 +90,9 @@ local group, err = groups:get(fields.group); if group then - if err then - return false, "An error occurred on the server. Please try again later."; - else - return false, "That group already exists"; - end + return false, "That group already exists"; + elseif err then + return false, "An error occurred on the server. Please try again later."; end if not groups:set(fields.group, { [user] = true }) then