-- This module added under the main virtual host domain -- It needs a lobby muc component -- -- VirtualHost "jitmeet.example.com" -- modules_enabled = { -- "muc_lobby_rooms" -- } -- lobby_muc = "lobby.jitmeet.example.com" -- main_muc = "conference.jitmeet.example.com" -- -- Component "lobby.jitmeet.example.com" "muc" -- storage = "memory" -- muc_room_cache_size = 1000 -- restrict_room_creation = true -- muc_room_locking = false -- muc_room_default_public_jids = true -- -- we use async to detect Prosody 0.10 and earlier local have_async = pcall(require, 'util.async'); if not have_async then module:log('warn', 'Lobby rooms will not work with Prosody version 0.10 or less.'); return; end local formdecode = require "util.http".formdecode; local jid_split = require 'util.jid'.split; local jid_bare = require 'util.jid'.bare; local json = require 'util.json'; local filters = require 'util.filters'; local st = require 'util.stanza'; local MUC_NS = 'http://jabber.org/protocol/muc'; local DISCO_INFO_NS = 'http://jabber.org/protocol/disco#info'; local DISPLAY_NAME_REQUIRED_FEATURE = 'http://jitsi.org/protocol/lobbyrooms#displayname_required'; local LOBBY_IDENTITY_TYPE = 'lobbyrooms'; local NOTIFY_JSON_MESSAGE_TYPE = 'lobby-notify'; local NOTIFY_LOBBY_ENABLED = 'LOBBY-ENABLED'; local NOTIFY_LOBBY_ACCESS_GRANTED = 'LOBBY-ACCESS-GRANTED'; local NOTIFY_LOBBY_ACCESS_DENIED = 'LOBBY-ACCESS-DENIED'; local is_healthcheck_room = module:require 'util'.is_healthcheck_room; local main_muc_component_config = module:get_option_string('main_muc'); if main_muc_component_config == nil then module:log('error', 'lobby not enabled missing main_muc config'); return ; end local lobby_muc_component_config = module:get_option_string('lobby_muc'); if lobby_muc_component_config == nil then module:log('error', 'lobby not enabled missing lobby_muc config'); return ; end local whitelist; local check_display_name_required; local function load_config() whitelist = module:get_option_set('muc_lobby_whitelist', {}); check_display_name_required = module:get_option_boolean('muc_lobby_check_display_name_required', true); end load_config(); local lobby_muc_service; local main_muc_service; -- Checks whether there is status in the