src/Client.js
/**
     * Check if a given ID is registered in whatsapp
     * @param {string} id the whatsapp user's ID
     * @returns {Promise<Boolean>}
     */
Check if a given ID is registered in whatsapp
@param {string} id the whatsapp user's ID
@returns {Promise}
Check if a given ID is registered in whatsapp @param { string } id the whatsapp user ' s ID @returns { Promise }
async isRegisteredUser(id) {
        if (!id.endsWith('@c.us')) {
            id += '@c.us';
        }
        return await this.pupPage.evaluate(async (id) => {
            if (window.Store.Features.features.MD_BACKEND) {
                id = window.Store.WidFactory.createWid(id);
                let handler = (new window.Store.USyncQuery).withContactProtocol();
                handler = handler.withUser((new window.Store.USyncUser).withId(id), handler.withDeviceProtocol(), 1);
                let result = await handler.execute();
                return result.list[0].devices.deviceList.length > 0;
            } else {
                let result = await window.Store.Wap.queryExist(id);
                return result.jid !== undefined;
            }
        }, id);
    }
async isRegisteredUser ( id ) { if ( ! id . endsWith ( '@c.us' ) ) { id += '@c.us' ; } return await this . pupPage . evaluate ( async ( id ) => { if ( window . Store . Features . features . MD_BACKEND ) { id = window . Store . WidFactory . createWid ( id ) ; let handler = ( new window . Store . USyncQuery ) . withContactProtocol ( ) ; handler = handler . withUser ( ( new window . Store . USyncUser ) . withId ( id ) , handler . withDeviceProtocol ( ) , 1 ) ; let result = await handler . execute ( ) ; return result . list [ 0 ] . devices . deviceList . length > 0 ; } else { let result = await window . Store . Wap . queryExist ( id ) ; return result . jid !== undefined ; } } , id ) ; }
Check if a given ID is registered in whatsapp
 @param {string} id the whatsapp user's ID
 @returns {Promise<Boolean>}
Check if a given ID is registered in whatsapp @param { string } id the whatsapp user ' s ID @returns { Promise<Boolean > }