fix: Fixes muc rate limit to fire occupant-pre-join.
If any handler returns a value (that isn't nil) then processing will halt and that value will be returned.
This commit is contained in:
parent
5a5656020b
commit
fb81619fc5
|
@ -83,7 +83,7 @@ module:hook("muc-occupant-pre-join", function (event)
|
||||||
-- skipping events we had produced and clear our flag
|
-- skipping events we had produced and clear our flag
|
||||||
if stanza.delayed_join_skip == true then
|
if stanza.delayed_join_skip == true then
|
||||||
event.stanza.delayed_join_skip = nil;
|
event.stanza.delayed_join_skip = nil;
|
||||||
return false;
|
return nil;
|
||||||
end
|
end
|
||||||
|
|
||||||
local throttle = room.join_rate_throttle;
|
local throttle = room.join_rate_throttle;
|
||||||
|
@ -101,7 +101,7 @@ module:hook("muc-occupant-pre-join", function (event)
|
||||||
|
|
||||||
if not add_item_to_queue(room.join_rate_presence_queue, event, room, stanza.attr.from) then
|
if not add_item_to_queue(room.join_rate_presence_queue, event, room, stanza.attr.from) then
|
||||||
-- let's not stop processing the event
|
-- let's not stop processing the event
|
||||||
return false;
|
return nil;
|
||||||
end
|
end
|
||||||
|
|
||||||
if not room.join_rate_queue_timer then
|
if not room.join_rate_queue_timer then
|
||||||
|
|
Loading…
Reference in New Issue