src/modules/chat/qbChat.js
function(listWithUpdates, callback) {
        /**
         * Callback for QB.chat.privacylist.update().
         * @param {Object} error - The error object
         * @param {Object} response - The privacy list object
         * @callback updatePrivacylistCallback
         * */

        var self = this;

        self.getList(listWithUpdates.name, function(error, existentList) {
            if (error) {
                callback(error, null);
            } else {
                var updatedList = {};
                updatedList.items = Utils.MergeArrayOfObjects(existentList.items, listWithUpdates.items);
                updatedList.name = listWithUpdates.name;

                self.create(updatedList, function(err, result) {
                    if (error) {
                        callback(err, null);
                    }else{
                        callback(null, result);
                    }
                });
            }
        });
    }
function(listWithUpdates, callback) {
        /**
         * Callback for QB.chat.privacylist.update().
         * @param {Object} error - The error object
         * @param {Object} response - The privacy list object
         * @callback updatePrivacylistCallback
         * */

        var self = this;

        self.getList(listWithUpdates.name, function(error, existentList) {
            if (error) {
                callback(error, null);
            } else {
                var updatedList = {};
                updatedList.items = Utils.MergeArrayOfObjects(existentList.items, listWithUpdates.items);
                updatedList.name = listWithUpdates.name;

                self.create(updatedList, function(err, result) {
                    if (error) {
                        callback(err, null);
                    }else{
                        callback(null, result);
                    }
                });
            }
        });
    }
function ( listWithUpdates , callback ) { /**
         * Callback for QB.chat.privacylist.update().
         * @param {Object} error - The error object
         * @param {Object} response - The privacy list object
         * @callback updatePrivacylistCallback
         * */ var self = this ; self . getList ( listWithUpdates . name , function ( error , existentList ) { if ( error ) { callback ( error , null ) ; } else { var updatedList = { } ; updatedList . items = Utils . MergeArrayOfObjects ( existentList . items , listWithUpdates . items ) ; updatedList . name = listWithUpdates . name ; self . create ( updatedList , function ( err , result ) { if ( error ) { callback ( err , null ) ; } else { callback ( null , result ) ; } } ) ; } } ) ; }
Update the privacy list.
@memberof QB.chat.privacylist
@param {String} name - The name of the list.
@param {updatePrivacylistCallback} callback - The callback function.
Update the privacy list .