fix(notification): sms subject output (#298)

This commit is contained in:
ththiem
2020-09-26 05:28:46 -07:00
committed by GitHub
parent 0aa7ab596c
commit 03755d5eb1
3 changed files with 9 additions and 4 deletions
+7 -2
View File
@@ -54,12 +54,17 @@ export const Print = {
return `${buildProductString(link, store)} :: CAPTCHA`;
},
inStock(link: Link, store: Store, color?: boolean): string {
inStock(link: Link, store: Store, color?: boolean, sms?: boolean): string {
if (color) {
return chalk.bgGreen.white.bold(`🚀🚨 ${buildProductString(link, store, false)} :: IN STOCK 🚨🚀`);
}
return `🚀🚨 ${buildProductString(link, store)} :: IN STOCK 🚨🚀`;
const productString = `${buildProductString(link, store)} :: IN STOCK`;
if (sms) {
return productString;
}
return `🚀🚨 ${productString} 🚨🚀`;
},
inStockWaiting(link: Link, store: Store, color?: boolean): string {
if (color) {
+1 -1
View File
@@ -27,7 +27,7 @@ export function sendSMS(link: Link, store: Store) {
}
] : undefined,
from: email.username,
subject: Print.inStock(link, store),
subject: Print.inStock(link, store, false, true),
text: link.cartUrl ? link.cartUrl : link.url,
to: generateAddress()
};
+1 -1
View File
@@ -12,7 +12,7 @@ export const BestBuy: Store = {
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.bestbuy.com/site/nvidia-geforce-rtx-2060-super-8gb-gddr6-pci-express-graphics-card-black-silver/6361329.p?skuId=6361329&intl=nosplash'
url: 'https://www.bestbuy.com/site/evga-ko-ultra-gaming-nvidia-geforce-rtx-2060-6gb-gddr6-pci-express-3-0-graphics-card-black-gray/6403801.p?skuId=6403801&intl=nosplash'
},
{
brand: 'nvidia',