Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(prosody): Fixes extracting domain when more cases. (#15930)

Дамян Минков73752618a336
diff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.lua
index e81bc8cdd1..6cfe23e7ff 100644
--- a/resources/prosody-plugins/util.lib.lua
+++ b/resources/prosody-plugins/util.lib.lua
@@ -279,7 +279,12 @@ function extract_subdomain(room_node)
return ret.subdomain, ret.room, ret.customer_id;
end
- local subdomain, room_name = room_node:match("^%[([^%]]+)%](.+)$") or nil, room_node;
+ local subdomain, room_name = room_node:match("^%[([^%]]+)%](.+)$");
+
+ if not subdomain then
+ room_name = room_node;
+ end
+
local _, customer_id = subdomain and subdomain:match("^(vpaas%-magic%-cookie%-)(.*)$") or nil, nil;
local cache_value = { subdomain=subdomain, room=room_name, customer_id=customer_id };
extract_subdomain_cache:set(room_node, cache_value);