Преглед изворни кода

fix: Fixes handling tenant in util and lobby.

master
damencho пре 4 година
родитељ
комит
a39f2aebd9

+ 9
- 8
doc/debian/jitsi-meet/jitsi-meet.example Прегледај датотеку

@@ -35,6 +35,7 @@ server {
35 35
     ssl_session_tickets off;
36 36
 
37 37
     add_header Strict-Transport-Security "max-age=63072000" always;
38
+    set $prefix "";
38 39
 
39 40
     ssl_certificate /etc/jitsi/meet/jitsi-meet.example.com.crt;
40 41
     ssl_certificate_key /etc/jitsi/meet/jitsi-meet.example.com.key;
@@ -76,7 +77,7 @@ server {
76 77
 
77 78
     # BOSH
78 79
     location = /http-bind {
79
-        proxy_pass       http://localhost:5280/http-bind;
80
+        proxy_pass http://127.0.0.1:5280/http-bind?prefix=$prefix&$args;
80 81
         proxy_set_header X-Forwarded-For $remote_addr;
81 82
         proxy_set_header Host $http_host;
82 83
     }
@@ -125,13 +126,6 @@ server {
125 126
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
126 127
     }
127 128
 
128
-    # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
129
-    location ~ ^/([^/?&:'"]+)/(.*)$ {
130
-        set $subdomain "$1.";
131
-        set $subdir "$1/";
132
-        rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
133
-    }
134
-
135 129
     # BOSH for subdomains
136 130
     location ~ ^/([^/?&:'"]+)/http-bind {
137 131
         set $subdomain "$1.";
@@ -149,4 +143,11 @@ server {
149 143
 
150 144
         rewrite ^/(.*)$ /xmpp-websocket;
151 145
     }
146
+
147
+    # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
148
+    location ~ ^/([^/?&:'"]+)/(.*)$ {
149
+        set $subdomain "$1.";
150
+        set $subdir "$1/";
151
+        rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
152
+    }
152 153
 }

+ 3
- 3
resources/prosody-plugins/mod_muc_lobby_rooms.lua Прегледај датотеку

@@ -40,6 +40,7 @@ local NOTIFY_LOBBY_ACCESS_GRANTED = 'LOBBY-ACCESS-GRANTED';
40 40
 local NOTIFY_LOBBY_ACCESS_DENIED = 'LOBBY-ACCESS-DENIED';
41 41
 
42 42
 local util = module:require "util";
43
+local get_room_by_name_and_subdomain = util.get_room_by_name_and_subdomain;
43 44
 local is_healthcheck_room = util.is_healthcheck_room;
44 45
 local presence_check_status = util.presence_check_status;
45 46
 
@@ -207,10 +208,9 @@ function process_lobby_muc_loaded(lobby_muc, host_module)
207 208
         local session, reply, node = event.origin, event.reply, event.node;
208 209
         if node == LOBBY_IDENTITY_TYPE
209 210
             and session.jitsi_web_query_room
210
-            and main_muc_service
211 211
             and check_display_name_required then
212
-            local room = main_muc_service.get_room_from_jid(
213
-                jid_bare(session.jitsi_web_query_room .. '@' .. main_muc_component_config));
212
+            local room = get_room_by_name_and_subdomain(session.jitsi_web_query_room, session.jitsi_web_query_prefix);
213
+
214 214
             if room and room._data.lobbyroom then
215 215
                 reply:tag('feature', { var = DISPLAY_NAME_REQUIRED_FEATURE }):up();
216 216
             end

+ 1
- 1
resources/prosody-plugins/util.lib.lua Прегледај датотеку

@@ -125,7 +125,7 @@ function get_room_by_name_and_subdomain(room_name, subdomain)
125 125
 
126 126
     -- if there is a subdomain we are in multidomain mode and that subdomain is not our main host
127 127
     if subdomain and subdomain ~= "" and subdomain ~= muc_domain_base then
128
-        room_address = "["..subdomain.."]"..room_address;
128
+        room_address = jid.join("["..subdomain.."]"..room_name, muc_domain);
129 129
     else
130 130
         room_address = jid.join(room_name, muc_domain);
131 131
     end

Loading…
Откажи
Сачувај