summaryrefslogtreecommitdiff
path: root/jitsi-meet/prosody-plugins/mod_poltergeist_component.lua
blob: aa06175dbae75bc282fd462586871432c1bcb9a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local st = require "util.stanza";

-- A component which we use to receive all stanzas for the created poltergeists
-- replays with error if an iq is sent
function no_action()
	return true;
end

function error_reply(event)
	module:send(st.error_reply(event.stanza, "cancel", "service-unavailable"));
	return true;
end

module:hook("presence/host", no_action);
module:hook("message/host", no_action);
module:hook("presence/full", no_action);
module:hook("message/full", no_action);

module:hook("iq/host", error_reply);
module:hook("iq/full", error_reply);
module:hook("iq/bare", error_reply);