src/modules/chat/qbChat.js
function(jid_or_user_id) {
        var jid;
        if (typeof jid_or_user_id === 'string') {
            jid = jid_or_user_id;
        } else if (typeof jid_or_user_id === 'number') {
            jid = jid_or_user_id + '-' + config.creds.appId + '@' + config.endpoints.chat;
        } else {
            throw new Error('The method "jidOrUserId" may take jid or id');
        }
        return jid;
    }
function(jid_or_user_id) {
        var jid;
        if (typeof jid_or_user_id === 'string') {
            jid = jid_or_user_id;
        } else if (typeof jid_or_user_id === 'number') {
            jid = jid_or_user_id + '-' + config.creds.appId + '@' + config.endpoints.chat;
        } else {
            throw new Error('The method "jidOrUserId" may take jid or id');
        }
        return jid;
    }
function ( jid_or_user_id ) { var jid ; if ( typeof jid_or_user_id === 'string' ) { jid = jid_or_user_id ; } else if ( typeof jid_or_user_id === 'number' ) { jid = jid_or_user_id + '-' + config . creds . appId + '@' + config . endpoints . chat ; } else { throw new Error ( 'The method "jidOrUserId" may take jid or id' ) ; } return jid ; }
Get unique id.
@memberof QB.chat.helpers
@param {String | Number} jid_or_user_id - Jid or user id.
@returns {String} - jid.
Get unique id .