From d7eccddf25712b9ef10254a7f2b41d1f487c1d7a Mon Sep 17 00:00:00 2001 From: demonspork Date: Thu, 11 Mar 2021 11:29:05 -0600 Subject: [PATCH] Fix follow_me_uuid error when enabling DND The follow me update code in do_not_disturb.lua was being executed even when the follow me uuid didn't exist. Let me know if this is the wrong approach to fix this in lua, I'm not particularly well versed in this but this seemed to have fixed it in my testing. I have some concerns about this section of code in general though, it seems that enabling server side DND will turn off follow me, but then turning off DND won't return follow me to its original state. Is this the intended behavior? and if so we might need to make a workaround. --- app/scripts/resources/scripts/do_not_disturb.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/do_not_disturb.lua b/app/scripts/resources/scripts/do_not_disturb.lua index 27229694f4..9c30436fb4 100644 --- a/app/scripts/resources/scripts/do_not_disturb.lua +++ b/app/scripts/resources/scripts/do_not_disturb.lua @@ -100,7 +100,7 @@ extension = row.extension; number_alias = row.number_alias or ''; accountcode = row.accountcode; - follow_me_uuid = row.follow_me_uuid; + follow_me_uuid = row.follow_me_uuid or nil; do_not_disturb = row.do_not_disturb; forward_all_destination = row.forward_all_destination; forward_all_enabled = row.forward_all_enabled;