src/modules/chat/qbChat.js
function(jid_or_user_id) {
        var chatType;
        if (typeof jid_or_user_id === 'string') {
            chatType = jid_or_user_id.indexOf("muc") > -1 ? 'groupchat' : 'chat';
        } else if (typeof jid_or_user_id === 'number') {
            chatType = 'chat';
        } else {
            throw new Error(unsupportedError);
        }
        return chatType;
    }
function(jid_or_user_id) {
        var chatType;
        if (typeof jid_or_user_id === 'string') {
            chatType = jid_or_user_id.indexOf("muc") > -1 ? 'groupchat' : 'chat';
        } else if (typeof jid_or_user_id === 'number') {
            chatType = 'chat';
        } else {
            throw new Error(unsupportedError);
        }
        return chatType;
    }
function ( jid_or_user_id ) { var chatType ; if ( typeof jid_or_user_id === 'string' ) { chatType = jid_or_user_id . indexOf ( "muc" ) > - 1 ? 'groupchat' : 'chat' ; } else if ( typeof jid_or_user_id === 'number' ) { chatType = 'chat' ; } else { throw new Error ( unsupportedError ) ; } return chatType ; }
Get the chat type.
@memberof QB.chat.helpers
@param {String | Number} jid_or_user_id - Jid or user id.
@returns {String} - jid.
Get the chat type .