Update indentation for blf_subscribe.lua (#6873)

This commit is contained in:
Antonio Fernandez 2024-01-20 18:46:26 -05:00 committed by GitHub
parent a2c54d98b4
commit 0de35ef4d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 72 additions and 72 deletions

View File

@ -46,13 +46,13 @@ end
local find_call_flow do
local find_call_flow_sql = [[select t1.call_flow_uuid, t1.call_flow_status
from v_call_flows t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.call_flow_feature_code = :feature_code
or t1.call_flow_feature_code = :short_feature_code)
]]
local find_call_flow_sql = [[select t1.call_flow_uuid, t1.call_flow_status
from v_call_flows t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.call_flow_feature_code = :feature_code
or t1.call_flow_feature_code = :short_feature_code)
]]
function find_call_flow(user)
function find_call_flow(user)
local ext, domain_name = split_first(user, '@', true)
local _, short = split_first(ext, '+', true)
if not domain_name then return end
@ -64,17 +64,17 @@ function find_call_flow(user)
dbh:release()
if not row then return end
return row.call_flow_uuid, row.call_flow_status
end
end
end
local find_dnd do
local find_dnd_sql = [[select t1.do_not_disturb
from v_extensions t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.extension = :extension or t1.number_alias=:extension)]]
local find_dnd_sql = [[select t1.do_not_disturb
from v_extensions t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.extension = :extension or t1.number_alias=:extension)]]
find_dnd = function(user)
find_dnd = function(user)
local ext, domain_name = split_first(user, '@', true)
if not domain_name then return end
local dbh = Database.new('system')
@ -82,17 +82,17 @@ find_dnd = function(user)
local dnd = dbh:first_value(find_dnd_sql, {domain_name = domain_name, extension = ext})
dbh:release()
return dnd
end
end
end
local find_call_forward do
local find_call_forward_sql = [[select t1.forward_all_destination, t1.forward_all_enabled
from v_extensions t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.extension = :extension or t1.number_alias=:extension)]]
local find_call_forward_sql = [[select t1.forward_all_destination, t1.forward_all_enabled
from v_extensions t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and (t1.extension = :extension or t1.number_alias=:extension)]]
find_call_forward = function(user)
find_call_forward = function(user)
local ext, domain_name, number = split_first(user, '@', true)
if not domain_name then return end
ext, number = split_first(ext, '/', true)
@ -107,18 +107,18 @@ find_call_forward = function(user)
row.forward_all_destination
end
return 'true', row.forward_all_destination
end
end
end
local find_agent_status do
local find_agent_uuid_sql = [[select t1.call_center_agent_uuid
from v_call_center_agents t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and t1.agent_name = :agent_name
]]
local find_agent_uuid_sql = [[select t1.call_center_agent_uuid
from v_call_center_agents t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid
where t2.domain_name = :domain_name and t1.agent_name = :agent_name
]]
function find_agent_status(user)
function find_agent_status(user)
local agent_name, domain_name = split_first(user, '@', true)
local _, short = split_first(agent_name, '+', true)
if not domain_name then return end
@ -135,7 +135,7 @@ function find_agent_status(user)
user_status = trim(api:executeString(cmd));
end
return row.call_center_agent_uuid, user_status
end
end
end