Comparison

mod_muc_rai/mod_muc_rai.lua @ 4058:cf9a1c7d558d

mod_muc_rai: Don't store/modify existing table to track rooms This was a simple bug that took a while to track down.
author Matthew Wild <mwild1@gmail.com>
date Thu, 02 Jul 2020 12:17:53 +0100
parent 4057:2ede3450abca
child 4059:072366857d79
comparison
equal deleted inserted replaced
4057:2ede3450abca 4058:cf9a1c7d558d
156 return nil, "internal-server-error"; 156 return nil, "internal-server-error";
157 end 157 end
158 interested_rooms = {}; 158 interested_rooms = {};
159 end 159 end
160 160
161 if not subscribed_users:set(user_jid, interested_rooms) then 161 if not subscribed_users:set(user_jid, {}) then
162 module:log("warn", "Subscriber limit (%d) reached, rejecting subscription from %s", max_subscribers, user_jid); 162 module:log("warn", "Subscriber limit (%d) reached, rejecting subscription from %s", max_subscribers, user_jid);
163 return nil, "resource-constraint"; 163 return nil, "resource-constraint";
164 end 164 end
165 165
166 local rooms_with_activity; 166 local rooms_with_activity;