diff options
| author | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2020-11-23 10:28:32 +0100 |
|---|---|---|
| committer | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2020-11-23 10:28:32 +0100 |
| commit | d3277d65639ef43230b71305922b5ccf33d86083 (patch) | |
| tree | 87455d87a534c1bcb33a34290b840b68e573df96 /jitsi-meet/prosody-plugins/mod_poltergeist_component.lua | |
initial commit
Diffstat (limited to 'jitsi-meet/prosody-plugins/mod_poltergeist_component.lua')
| -rw-r--r-- | jitsi-meet/prosody-plugins/mod_poltergeist_component.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jitsi-meet/prosody-plugins/mod_poltergeist_component.lua b/jitsi-meet/prosody-plugins/mod_poltergeist_component.lua new file mode 100644 index 0000000..aa06175 --- /dev/null +++ b/jitsi-meet/prosody-plugins/mod_poltergeist_component.lua @@ -0,0 +1,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); |
