-- Prosody configuration template for SecuBox Jitsi
-- This is a reference template; actual config is generated by Docker

plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }

muc_mapper_domain_base = "XMPP_DOMAIN";
muc_mapper_domain_prefix = "muc";

http_default_host = "XMPP_DOMAIN"

consider_bosh_secure = true;
consider_websocket_secure = true;

cross_domain_bosh = true;
cross_domain_websocket = true;

VirtualHost "XMPP_DOMAIN"
    authentication = "AUTH_TYPE"
    ssl = {
        key = "/config/certs/XMPP_DOMAIN.key";
        certificate = "/config/certs/XMPP_DOMAIN.crt";
    }
    modules_enabled = {
        "bosh";
        "websocket";
        "smacks";
        "pubsub";
        "ping";
        "speakerstats";
        "conference_duration";
        "room_metadata";
        "muc_lobby_rooms";
        "muc_breakout_rooms";
        "av_moderation";
        "polls";
    }
    main_muc = "MUC_DOMAIN"
    lobby_muc = "lobby.XMPP_DOMAIN"
    breakout_rooms_muc = "breakout.XMPP_DOMAIN"

VirtualHost "GUEST_DOMAIN"
    authentication = "anonymous"

Component "MUC_DOMAIN" "muc"
    storage = "memory"
    modules_enabled = {
        "muc_meeting_id";
        "muc_domain_mapper";
        "polls";
    }
    muc_room_locking = false
    muc_room_default_public_jids = true

Component "AUTH_DOMAIN" "speakerstats_component"
    muc_component = "MUC_DOMAIN"

Component "focus.XMPP_DOMAIN" "client_proxy"
    target_address = "focus@AUTH_DOMAIN"
