imports/vx/server/code/vxapp.js
/**
     * Clear the specified PNotify notification.  This will only work if the user
     * is the owner of the notification.
     *
     * @param {string} notificationId Notification ID.
     * @param {boolean} sent True to mark the record as sent.
     * @return {object} Result object.
     */
Clear the specified PNotify notification.  This will only work if the user
is the owner of the notification.

@param {string} notificationId Notification ID.
@param {boolean} sent True to mark the record as sent.
@return {object} Result object.
Clear the specified PNotify notification . This will only work if the user is the owner of the notification . @param { string } notificationId Notification ID . @param { boolean } sent True to mark the record as sent . @return { object } Result object .
clearPNotify(notificationId, sent) {
        try {
            if (!_.isString(notificationId)) {
                OLog.error(`vxapp.js clearPNotify parameter check failed notificationId=${notificationId}`)
                return { success: false, icon: "EYE", key: "common.alert_parameter_check_failed" }
            }
            const notification = Notifications.findOne(notificationId)
            if (!notification) {
                OLog.error(`vxapp.js clearPNotify unable to find notificationId=${notificationId}`)
                return { success: false, icon: "BUG", key: "common.alert_transaction_fail_notification_not_found", variables: { notificationId: notificationId } }
            }
            return VXApp.updateNotification(notificationId, "PNOTIFY", sent ? ["processed", "sent"] : ["processed"])
        }
        catch (error) {
            OLog.error(`vxapp.js clearPNotify unexpected error=${error}`)
            return { success: false, icon: "BUG", key: "common.alert_unexpected_error", variables: { error: error.toString() } }
        }
    }
clearPNotify ( notificationId , sent ) { try { if ( ! _ . isString ( notificationId ) ) { OLog . error ( ` ${ notificationId } ` ) return { success : false , icon : "EYE" , key : "common.alert_parameter_check_failed" } } const notification = Notifications . findOne ( notificationId ) if ( ! notification ) { OLog . error ( ` ${ notificationId } ` ) return { success : false , icon : "BUG" , key : "common.alert_transaction_fail_notification_not_found" , variables : { notificationId : notificationId } } } return VXApp . updateNotification ( notificationId , "PNOTIFY" , sent ? [ "processed" , "sent" ] : [ "processed" ] ) } catch ( error ) { OLog . error ( ` ${ error } ` ) return { success : false , icon : "BUG" , key : "common.alert_unexpected_error" , variables : { error : error . toString ( ) } } } }
Clear the specified PNotify notification.
Clear the specified PNotify notification .