File

mod_block_subscriptions/mod_block_subscriptions.lua @ 5420:aa068449b0b6

mod_http_oauth2: Bail out of implicit flow on invalid or missing redirect Probably hasn't been tested, and maybe never will since it's disabled and more or less deprecated in OAuth 2.1
author Kim Alvefur <zash@zash.se>
date Sat, 06 May 2023 12:23:22 +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