Update indentation for blf_subscribe.lua (#6873)
This commit is contained in:
parent
a2c54d98b4
commit
0de35ef4d7
|
|
@ -46,13 +46,13 @@ end
|
||||||
|
|
||||||
local find_call_flow do
|
local find_call_flow do
|
||||||
|
|
||||||
local find_call_flow_sql = [[select t1.call_flow_uuid, t1.call_flow_status
|
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
|
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
|
where t2.domain_name = :domain_name and (t1.call_flow_feature_code = :feature_code
|
||||||
or t1.call_flow_feature_code = :short_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 ext, domain_name = split_first(user, '@', true)
|
||||||
local _, short = split_first(ext, '+', true)
|
local _, short = split_first(ext, '+', true)
|
||||||
if not domain_name then return end
|
if not domain_name then return end
|
||||||
|
|
@ -64,17 +64,17 @@ function find_call_flow(user)
|
||||||
dbh:release()
|
dbh:release()
|
||||||
if not row then return end
|
if not row then return end
|
||||||
return row.call_flow_uuid, row.call_flow_status
|
return row.call_flow_uuid, row.call_flow_status
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local find_dnd do
|
local find_dnd do
|
||||||
|
|
||||||
local find_dnd_sql = [[select t1.do_not_disturb
|
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
|
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)]]
|
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)
|
local ext, domain_name = split_first(user, '@', true)
|
||||||
if not domain_name then return end
|
if not domain_name then return end
|
||||||
local dbh = Database.new('system')
|
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})
|
local dnd = dbh:first_value(find_dnd_sql, {domain_name = domain_name, extension = ext})
|
||||||
dbh:release()
|
dbh:release()
|
||||||
return dnd
|
return dnd
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local find_call_forward do
|
local find_call_forward do
|
||||||
|
|
||||||
local find_call_forward_sql = [[select t1.forward_all_destination, t1.forward_all_enabled
|
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
|
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)]]
|
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)
|
local ext, domain_name, number = split_first(user, '@', true)
|
||||||
if not domain_name then return end
|
if not domain_name then return end
|
||||||
ext, number = split_first(ext, '/', true)
|
ext, number = split_first(ext, '/', true)
|
||||||
|
|
@ -107,18 +107,18 @@ find_call_forward = function(user)
|
||||||
row.forward_all_destination
|
row.forward_all_destination
|
||||||
end
|
end
|
||||||
return 'true', row.forward_all_destination
|
return 'true', row.forward_all_destination
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local find_agent_status do
|
local find_agent_status do
|
||||||
|
|
||||||
local find_agent_uuid_sql = [[select t1.call_center_agent_uuid
|
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
|
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
|
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 agent_name, domain_name = split_first(user, '@', true)
|
||||||
local _, short = split_first(agent_name, '+', true)
|
local _, short = split_first(agent_name, '+', true)
|
||||||
if not domain_name then return end
|
if not domain_name then return end
|
||||||
|
|
@ -135,7 +135,7 @@ function find_agent_status(user)
|
||||||
user_status = trim(api:executeString(cmd));
|
user_status = trim(api:executeString(cmd));
|
||||||
end
|
end
|
||||||
return row.call_center_agent_uuid, user_status
|
return row.call_center_agent_uuid, user_status
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue