imports/vx/both/code/util.js
/**
     * Determine whether the specified mode of notification is desired by the recipient.
     *
     * @param {object} notification Notification record.
     * @param {string} mode Mode of notification.
     * @return {boolean} True if mode of notification is desired.
     */
Determine whether the specified mode of notification is desired by the recipient.
@param {object} notification Notification record.
@param {string} mode Mode of notification.
@return {boolean} True if mode of notification is desired.
Determine whether the specified mode of notification is desired by the recipient . @param { object } notification Notification record . @param { string } mode Mode of notification . @return { boolean } True if mode of notification is desired .
isNotificationDesired(notification, mode) {
        let user = Meteor.users.findOne(notification.recipientId)
        if (!user) {
            return false
        }
        if (!notification.eventType) {
            return mode === "PNOTIFY"
        }
        return Util.isNotificationEnabled(user, notification.eventType, mode)
    }
isNotificationDesired ( notification , mode ) { let user = Meteor . users . findOne ( notification . recipientId ) if ( ! user ) { return false } if ( ! notification . eventType ) { return mode === "PNOTIFY" } return Util . isNotificationEnabled ( user , notification . eventType , mode ) }
Determine whether the specified mode of notification is desired by the recipient.
Determine whether the specified mode of notification is desired by the recipient .
// Some special notifications have no event type, in such case there can be no EMAIL or SMS. // But PNOTIFY is unconditional.