fixed admin check for token verification

This commit is contained in:
Shawn 2021-01-05 11:36:07 +00:00 committed by Дамян Минков
parent 32fb08c56f
commit 060a8628ce
1 changed files with 5 additions and 1 deletions

View File

@ -4,9 +4,13 @@
local log = module._log; local log = module._log;
local host = module.host; local host = module.host;
local st = require "util.stanza"; local st = require "util.stanza";
local is_admin = require "core.usermanager".is_admin; local um_is_admin = require "core.usermanager".is_admin;
local function is_admin(jid)
return um_is_admin(jid, host);
end
local parentHostName = string.gmatch(tostring(host), "%w+.(%w.+)")(); local parentHostName = string.gmatch(tostring(host), "%w+.(%w.+)")();
if parentHostName == nil then if parentHostName == nil then
log("error", "Failed to start - unable to get parent hostname"); log("error", "Failed to start - unable to get parent hostname");