Comparison

mod_adhoc_groups/mod_adhoc_groups.lua @ 4030:0d7293c37e1a

mod_adhoc_groups: Fix responding with "You are already in this group." (was never sent before)
author Karol Topolski <ktopolski.it@gmail.com>
date Wed, 20 May 2020 17:25:59 +0200
parent 2870:d8325dfb6a13
child 4031:b2a6e163a6b4
comparison
equal deleted inserted replaced
4029:b9bd56790286 4030:0d7293c37e1a
129 return false, "An error occurred on the server. Please try again later."; 129 return false, "An error occurred on the server. Please try again later.";
130 else 130 else
131 return false, "No such group"; 131 return false, "No such group";
132 end 132 end
133 end 133 end
134 if group[data.from] then 134 if group[user] then
135 return false, "You are already in this group."; 135 return false, "You are already in this group.";
136 end 136 end
137 137
138 if not memberships:set(fields.group, user, true) then 138 if not memberships:set(fields.group, user, true) then
139 return false, "An error occurred while adding you to the group"; 139 return false, "An error occurred while adding you to the group";