File

mod_block_subscriptions/mod_block_subscriptions.lua @ 6249:12a2989c7cc1

mod_limits_exception: obsolete diff --git a/mod_limits_exception/README.md b/mod_limits_exception/README.md --- a/mod_limits_exception/README.md +++ b/mod_limits_exception/README.md @@ -1,6 +1,8 @@ --- +labels: +- Stage-Obsolete summary: Allow specified JIDs to bypass rate limits -... +--- This module allows you to configure a list of JIDs that should be allowed to bypass rate limit restrictions.
author Menel <menel@snikket.de>
date Mon, 12 May 2025 10:57:17 +0200
parent 773:107eb83aa732
line wrap: on
line source

local allowed_presence_types = { probe = true, unavailable = true };

function filter_presence(event)
	local stanza = event.stanza;
	local presence_type = stanza.attr.type;
	if presence_type == nil or allowed_presence_types[presence_type] then
		return;
	end
	return true; -- Drop
end

module:hook("pre-presence/bare", filter_presence, 200); -- Client sending
module:hook("presence/bare", filter_presence, 200); -- Client receiving