Comparison

mod_muc_rai/mod_muc_rai.lua @ 4074:4b84beb48ba0

mod_muc_rai: Ignore presence to host that doesn't contain the <rai/> element
author Matthew Wild <mwild1@gmail.com>
date Wed, 19 Aug 2020 15:14:00 +0100
parent 4060:b44620cacb11
child 4277:10dc4527574f
comparison
equal deleted inserted replaced
4073:f6542e51b741 4074:4b84beb48ba0
193 if stanza.attr.type == "unavailable" then -- User going offline 193 if stanza.attr.type == "unavailable" then -- User going offline
194 unsubscribe_user_from_all_rooms(user_jid); 194 unsubscribe_user_from_all_rooms(user_jid);
195 return true; 195 return true;
196 end 196 end
197 197
198 if not stanza:get_child("rai", xmlns_rai) then
199 return; -- Ignore, no <rai/> tag
200 end
201
198 local rooms_with_activity, err = subscribe_all_rooms(user_jid); 202 local rooms_with_activity, err = subscribe_all_rooms(user_jid);
199 203
200 if not rooms_with_activity then 204 if not rooms_with_activity then
201 if not err then 205 if not err then
202 module:log("debug", "No activity to notify"); 206 module:log("debug", "No activity to notify");