Some whacky fixes in case shit goes down

This commit is contained in:
Christopher Cookman 2023-10-01 18:16:28 -06:00
parent 7728fab3f3
commit 3c5f2311e8
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -108,7 +108,7 @@ watcher.on("add", async (filePath, stats) => {
let txtFile = filePath.replace(".wav", ".txt");
if (!fs.existsSync(txtFile)) return;
vmData = fpbxFuncs.parseVoicemailInfo(fs.readFileSync(txtFile, "utf8"));
if (!vmData) return; // Somehow this happens once in a while, not sure why
let extData = await lookupExtension(vmData.origmailbox, "ext").catch((error) => {
console.log(error);
});