src/modules/chat/qbChat.js
function(occupantsIds, UserId) {
        var recipient = null;
        occupantsIds.forEach(function(item) {
            if(item != UserId){
                recipient = item;
            }
        });
        return recipient;
    }
function(occupantsIds, UserId) {
        var recipient = null;
        occupantsIds.forEach(function(item) {
            if(item != UserId){
                recipient = item;
            }
        });
        return recipient;
    }
function ( occupantsIds , UserId ) { var recipient = null ; occupantsIds . forEach ( function ( item ) { if ( item != UserId ) { recipient = item ; } } ) ; return recipient ; }
Get the recipint id.
@memberof QB.chat.helpers
@param {Array} occupantsIds - Array of user ids.
@param {Number} UserId - Jid or user id.
@returns {Number} recipient - recipient id.
Get the recipint id .