Răsfoiți Sursa

jicofo,prosody: migrate to new reservations system

It's now implemented in Prosody rather than in Jicofo.
Mahdhi Rezvi 2 ani în urmă
părinte
comite
8337c0b108

+ 2 - 2
docker-compose.yml

@@ -199,6 +199,8 @@ services:
             - LDAP_START_TLS
             - LDAP_URL
             - LDAP_USE_TLS
+            - PROSODY_RESERVATION_ENABLED
+            - PROSODY_RESERVATION_REST_BASE_URL
             - PUBLIC_URL
             - TURN_CREDENTIALS
             - TURN_HOST
@@ -247,8 +249,6 @@ services:
             - JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT
             - JICOFO_ENABLE_HEALTH_CHECKS
             - JICOFO_SHORT_ID
-            - JICOFO_RESERVATION_ENABLED
-            - JICOFO_RESERVATION_REST_BASE_URL
             - JIBRI_BREWERY_MUC
             - JIBRI_REQUEST_RETRIES
             - JIBRI_PENDING_TIMEOUT

+ 0 - 7
jicofo/rootfs/defaults/jicofo.conf

@@ -156,11 +156,4 @@ jicofo {
       trusted-domains = [ "{{ $XMPP_RECORDER_DOMAIN }}" ]
       {{ end }}
     }
-
-    {{ if .Env.JICOFO_RESERVATION_ENABLED | default "false" | toBool }}
-    reservation {
-      enabled = "{{ .Env.JICOFO_RESERVATION_ENABLED }}"
-      base-url = "{{ .Env.JICOFO_RESERVATION_REST_BASE_URL }}"
-    }
-    {{ end }}
 }

+ 9 - 0
prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua

@@ -28,6 +28,8 @@
 {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
 {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
 {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
+{{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool }}
+{{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" }}
 
 admins = {
     "{{ $JICOFO_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
@@ -150,6 +152,9 @@ VirtualHost "{{ $XMPP_DOMAIN }}"
         {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }}
         "auth_cyrus";
         {{end}}
+        {{ if $PROSODY_RESERVATION_ENABLED }}
+        "reservations";
+        {{ end }}
     }
 
     main_muc = "{{ $XMPP_MUC_DOMAIN }}"
@@ -161,6 +166,10 @@ VirtualHost "{{ $XMPP_DOMAIN }}"
     {{ end }}
     {{ end }}
 
+    {{ if $PROSODY_RESERVATION_ENABLED }}
+    reservations_api_prefix = { "{{ $PROSODY_RESERVATION_REST_BASE_URL }}" }  
+    {{ end }}
+
     {{ if $ENABLE_BREAKOUT_ROOMS }}
     breakout_rooms_muc = "breakout.{{ $XMPP_DOMAIN }}"
     {{ end }}