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 096a7ec4a3
commit 39cc2ce9e8
1 changed files with 2 additions and 2 deletions

View File

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