Push Notifications Fixes - Part 2 (#12092)

* push notifications: handle some more error codes and when the user is loaded using .lean()

* fix lint

* do not send push notification if message is missing
This commit is contained in:
Matteo Pagliazzi
2020-04-15 21:36:53 +02:00
committed by GitHub
parent cc04761c24
commit c5aeab652d
8 changed files with 43 additions and 20 deletions

View File

@@ -11,7 +11,7 @@ import { // eslint-disable-line import/no-cycle
import { removeFromArray } from '../libs/collectionManipulators';
import shared from '../../common';
import { sendTxn as txnEmail } from '../libs/email'; // eslint-disable-line import/no-cycle
import { sendNotification as sendPushNotification } from '../libs/pushNotifications';
import { sendNotification as sendPushNotification } from '../libs/pushNotifications'; // eslint-disable-line import/no-cycle
import { syncableAttrs, setNextDue } from '../libs/taskManager';
const { Schema } = mongoose;