Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Adds poltergeist support for locked rooms. (#2626)
Дамян Минковeb53944a4da9
diff --git a/resources/prosody-plugins/mod_muc_poltergeist.lua b/resources/prosody-plugins/mod_muc_poltergeist.luaindex 0b18eee272..32a9aac2c6 100644--- a/resources/prosody-plugins/mod_muc_poltergeist.lua+++ b/resources/prosody-plugins/mod_muc_poltergeist.lua@@ -7,6 +7,7 @@ local st = require "util.stanza";local get_room_from_jid = module:require "util".get_room_from_jid;local wrap_async_run = module:require "util".wrap_async_run;local timer = require "util.timer";+local MUC_NS = "http://jabber.org/protocol/muc";-- Optionslocal poltergeist_component@@ -200,12 +201,12 @@ end);-- @param avatar the avatar to use for the new occupant (optional)-- @param status the initial status to use for the new occupant (optional)function create_poltergeist_occupant(room, nick, name, avatar, status)- log("debug", "create_poltergeist_occupant %s:", nick);+ log("debug", "create_poltergeist_occupant %s", nick);-- Join poltergeist occupant to room, with the invited JID as their nicklocal join_presence = st.presence({to = room.jid.."/"..nick,from = poltergeist_component.."/"..nick- }):tag("x", { xmlns = "http://jabber.org/protocol/muc" }):up();+ }):tag("x", { xmlns = MUC_NS }):up();if (name) thenjoin_presence:tag(@@ -219,6 +220,13 @@ function create_poltergeist_occupant(room, nick, name, avatar, status)join_presence:tag("status"):text(status):up();end+ -- If the room has a password set, let the poltergeist enter using it+ local room_password = room:get_password();+ if room_password then+ local join = join_presence:get_child("x", MUC_NS);+ join:tag("password", { xmlns = MUC_NS }):text(room_password);+ end+room:handle_first_presence(prosody.hosts[poltergeist_component], join_presence);