mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Thanks to Matthew Wild for the initial help of creating these. Module with REST interface to create poltergeist participants and change their statuses. When user with same id joins the room, the poltergeist is removed. We also make sure that that user uses same username when authenticates. This way we are sure that user will join the room with the same nick as the poltergeist.
22 lines
592 B
Lua
22 lines
592 B
Lua
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);
|