Skip to content

Commit

Permalink
sqaush: Make sure filtering works when only is a moderator.
Browse files Browse the repository at this point in the history
It works now and without a token and no features, but being moderator.
  • Loading branch information
damencho committed Sep 3, 2024
1 parent f2b0f41 commit b99a1de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resources/prosody-plugins/mod_filter_iq_rayo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ module:hook("pre-iq/full", function(event)
is_session_allowed = room:get_affiliation(stanza.attr.from) == 'owner';
end

if (token == nil
or roomName == nil
or not token_util:verify_room(session, room_real_jid)
if (roomName == nil
or (token ~= nil and not token_util:verify_room(session, room_real_jid))
or not (is_session_allowed or is_granting_session_allowed))
then
module:log("warn", "Filtering stanza dial, stanza:%s", tostring(stanza));
Expand Down

0 comments on commit b99a1de

Please sign in to comment.