fix: cyclical dependencies

Fixes #468

Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
Jef LeCompte
2020-10-09 13:29:41 -05:00
parent eac05c610d
commit ed970fc397
3 changed files with 11 additions and 10 deletions
+8 -6
View File
@@ -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);
}
+1 -1
View File
@@ -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;