mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 07:37:39 +00:00
fix(notification): sms subject output (#298)
This commit is contained in:
+7
-2
@@ -54,12 +54,17 @@ export const Print = {
|
|||||||
|
|
||||||
return `✖ ${buildProductString(link, store)} :: CAPTCHA`;
|
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) {
|
if (color) {
|
||||||
return chalk.bgGreen.white.bold(`🚀🚨 ${buildProductString(link, store, false)} :: IN STOCK 🚨🚀`);
|
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 {
|
inStockWaiting(link: Link, store: Store, color?: boolean): string {
|
||||||
if (color) {
|
if (color) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function sendSMS(link: Link, store: Store) {
|
|||||||
}
|
}
|
||||||
] : undefined,
|
] : undefined,
|
||||||
from: email.username,
|
from: email.username,
|
||||||
subject: Print.inStock(link, store),
|
subject: Print.inStock(link, store, false, true),
|
||||||
text: link.cartUrl ? link.cartUrl : link.url,
|
text: link.cartUrl ? link.cartUrl : link.url,
|
||||||
to: generateAddress()
|
to: generateAddress()
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const BestBuy: Store = {
|
|||||||
brand: 'test:brand',
|
brand: 'test:brand',
|
||||||
model: 'test:model',
|
model: 'test:model',
|
||||||
series: 'test:series',
|
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',
|
brand: 'nvidia',
|
||||||
|
|||||||
Reference in New Issue
Block a user