Enable system response to Amazon locker emails

This commit is contained in:
Elizabeth Cray 2024-11-14 20:19:33 -05:00
parent 49c62f83bb
commit 936254c86a

View File

@ -6,7 +6,7 @@ import {
export const handler = async (event) => {
console.info("Event: ", event);
let result = "did not send";
if (event.subject.includes("You have deliveries") || event.subject.includes("You have a delivery")) {
if (event.subject.includes("You have deliveries") || event.subject.includes("You have a delivery") || event.subject.includes("You have a package to pick up")) {
// Trigger home notification
console.info("Matched Subject");
const command = `ssh ${process.env.INTERNAL_HOST} "/home/liz/.sound '${process.env.INTERNAL_FILE}'"`;