mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 19:06:37 +00:00
[follow me] Persist follow me enabled when enabling DND or call forward (#6076)
If follow-me is enabled and then turning on DND or call-forward, follow-me should be enabled when disabling the DND or the call-forward.
This commit is contained in:
@@ -145,7 +145,6 @@
|
||||
local accountcode = row.accountcode;
|
||||
local forward_all_enabled = row.forward_all_enabled;
|
||||
local last_forward_all_destination = row.forward_all_destination;
|
||||
local follow_me_uuid = row.follow_me_uuid;
|
||||
local toll_allow = row.toll_allow or '';
|
||||
|
||||
--toggle enabled
|
||||
@@ -212,19 +211,6 @@
|
||||
session:streamFile(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-call_forwarding_has_been_cancelled.wav");
|
||||
end
|
||||
|
||||
--disable the follow me
|
||||
if enabled == "true" and not empty(follow_me_uuid) then
|
||||
local sql = "update v_follow_me set ";
|
||||
sql = sql .. "follow_me_enabled = 'false' ";
|
||||
sql = sql .. "where domain_uuid = :domain_uuid ";
|
||||
sql = sql .. "and follow_me_uuid = :follow_me_uuid ";
|
||||
local params = {domain_uuid = domain_uuid, follow_me_uuid = follow_me_uuid};
|
||||
if (debug["sql"]) then
|
||||
log.noticef("SQL: %s; params: %s", sql, json.encode(params));
|
||||
end
|
||||
dbh:query(sql, params);
|
||||
end
|
||||
|
||||
--check the destination
|
||||
if empty(forward_all_destination) then
|
||||
enabled = "false";
|
||||
|
||||
Reference in New Issue
Block a user