mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 08:47:43 +00:00
fix: cyclical dependencies
Fixes #468 Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
@@ -5,22 +5,24 @@ import {sendDiscordMessage} from './discord';
|
||||
import {sendEmail} from './email';
|
||||
import {sendPushbulletNotification} from './pushbullet';
|
||||
import {sendPushoverNotification} from './pushover';
|
||||
import {sendSMS} from './sms';
|
||||
import {sendSlackMessage} from './slack';
|
||||
import {sendSms} from './sms';
|
||||
import {sendTelegramMessage} from './telegram';
|
||||
import {sendTweet} from './twitter';
|
||||
import {sendTwilioMessage} from './twilio';
|
||||
|
||||
export function sendNotification(link: Link, store: Store) {
|
||||
sendEmail(link, store);
|
||||
sendSMS(link, store);
|
||||
// Priority
|
||||
playSound();
|
||||
sendEmail(link, store);
|
||||
sendSms(link, store);
|
||||
sendDesktopNotification(link, store);
|
||||
// Non-priority
|
||||
sendDiscordMessage(link, store);
|
||||
sendSlackMessage(link, store);
|
||||
sendTelegramMessage(link, store);
|
||||
sendTwilioMessage(link, store);
|
||||
sendPushbulletNotification(link, store);
|
||||
sendPushoverNotification(link, store);
|
||||
sendSlackMessage(link, store);
|
||||
sendTelegramMessage(link, store);
|
||||
sendTweet(link, store);
|
||||
sendTwilioMessage(link, store);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ if (config.notifications.phone.number && !config.notifications.email.username) {
|
||||
|
||||
const [email, phone] = [config.notifications.email, config.notifications.phone];
|
||||
|
||||
export function sendSMS(link: Link, store: Store) {
|
||||
export function sendSms(link: Link, store: Store) {
|
||||
if (phone.number) {
|
||||
logger.debug('↗ sending sms');
|
||||
const carrier = phone.carrier;
|
||||
|
||||
Reference in New Issue
Block a user