feat: Several module optimizations to avoid constant parsing of jids. (#12594)

* feat: Several module optimizations to avoid constant parsing of jids.

Caches the parsed values in a rotating table with limited size.
Skips constant creating of a stanza with never changing values - create it once and then just clone it.

* squash: Fixes extract_subdomain multiple values.

* squash: Fix table values when there is a nil element.

* squash: Fix skipping the roomless IQs.

* squash: Fix comments.
This commit is contained in:
Дамян Минков
2022-11-28 14:18:59 -06:00
committed by GitHub
parent 76471a0ea9
commit 744960bb1a
3 changed files with 56 additions and 34 deletions

View File

@@ -273,9 +273,7 @@ end
-- and was not successful
function Util:verify_room(session, room_address)
if self.allowEmptyToken and session.auth_token == nil then
module:log(
"debug",
"Skipped room token verification - empty tokens are allowed");
--module:log("debug", "Skipped room token verification - empty tokens are allowed");
return true;
end