Update index.lua (#2473)

Bug fix in per user vm transcription. If domain had transcription enabled but the user did not, then the sql insert of the msg would fail.
This commit is contained in:
konradSC
2017-04-04 23:24:13 -04:00
committed by FusionPBX
parent 5d463f1cd9
commit 0852dee581

View File

@@ -423,7 +423,7 @@
if (storage_type == "base64") then
table.insert(sql, "message_base64, ");
end
if (transcribe_enabled == "true") then
if (transcribe_enabled == "true") and (voicemail_transcription_enabled == "true") then
table.insert(sql, "message_transcription, ");
end
table.insert(sql, "message_length ");
@@ -441,7 +441,7 @@
if (storage_type == "base64") then
table.insert(sql, ":message_base64, ");
end
if (transcribe_enabled == "true") then
if (transcribe_enabled == "true") and (voicemail_transcription_enabled == "true") then
table.insert(sql, ":transcription, ");
end
table.insert(sql, ":message_length ");