You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2024. It is now read-only.
I did see issue #11 mentioned the same thing, but wasn't sure if anyone would see my reply since it has been closed.
This is also an issue for our environment. It would be great if there was an easier way to change the time zone other than changing the code. Maybe there could be an environment variable in the Lambda function that could be easily changed to the desired value like "America/New_York" or "America/Denver"
The text was updated successfully, but these errors were encountered:
With some direction from AWS support, I was able to modify the code. Here was my solution.
Download the Lambda code package for the following two functions:
Change the code in the following two javascript files for each package:
transcription.js
voicemail.js
sendMail(e, t, n, r) {
return new Promise((s, i) => {
let o = `<p>${(new Date(1e3*e.timestamp)).toLocaleString('en-US', { timeZone: 'America/Denver' })}</p>`;
if (o += `<p>New voicemail from ${e.contactPhoneNumber}.</p>`, r.transcription && (o += `<b>Voicemail Transcript:</b><p>${r.transcription.transcripts[0].transcript}</p>`), o += "<b>Voicemail:</b>", r.preSignedUrl) {
o += `<p>Voicemail Expiration Date: ${(new Date(1e3*Math.floor(Date.now()/1e3+r.preSignedUrl.expires))).toLocaleString('en-US', { timeZone: 'America/Denver' })}</p>`, o += `<p><a href="${r.preSignedUrl.url}">Click Here</a> to listen to the voicemail</p>`
}
Then re-zip the packages and upload them into the functions. I had trouble zipping in Windows due to file/path length, so I did it in Linux.
Next time I'll have to try cloning the dev branch and building my own.
It would be great if there was an Environment Variable that could be easily edited in the Lambda function overview for this value.
I did see issue #11 mentioned the same thing, but wasn't sure if anyone would see my reply since it has been closed.
This is also an issue for our environment. It would be great if there was an easier way to change the time zone other than changing the code. Maybe there could be an environment variable in the Lambda function that could be easily changed to the desired value like "America/New_York" or "America/Denver"
The text was updated successfully, but these errors were encountered: