open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.1k stars 590 forks source link

getMe() does not return all information in MD #2555

Closed edgaru closed 2 years ago

edgaru commented 2 years ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

My own code

Current Behavior

Only return

{
        id: '1',
        pushname: '.',
        type: 'in',
        promises: {},
        status: 'XXXXXXXXXXX@c.us',
        profilePicThumb: null,
        platform: 'android',
        me: {
          server: 'c.us',
          user: 'XXXXXXXXXXX',
          _serialized: 'XXXXXXXXXXX@c.us'
        }
}

Expected Behavior

{
  id: '1',
  pushname: 'XXXXXXX',
  type: 'in',
  promises: {},
  status: 'XXXXXXXXXXX@c.us',
  profilePicThumb: 'https://web.whatsapp.com/pp?e=https%3A%2F%2Fpps.whatsapp.net%2Fv%2Ft61.24694-24%XXXXXXXXXXX.jpg%3Fccb%3D11-4%26oh%t%26oe%3D622FC003&t=l&u=XXXXXXXXXXX%40c.us&i=XXXXXXXXXXX&n=f%2B%2FKWwfsXnnmJaYPiPiISjABn2l0pUidNmg6DeS4ugs%3D',
  locale: 'es',
  ref: '1@XXXXXXXXXXX==',
  refTTL: 20000,
  wid: 'XXXXXXXXXXX@c.us',
  connected: true,
  protoVersion: [ 0, 17 ],
  clientToken: 'REDACTED',
  serverToken: 'REDACTED',
  isResponse: 'true',
  battery: 79,
  lc: 'US',
  lg: 'en',
  locales: 'en-US',
  platform: 'android',
  phone: {
    wa_version: '2.22.5.72',
    mcc: '334',
    mnc: '050',
    os_version: '8.1.0',
    device_manufacturer: 'HUAWEI',
    device_model: 'HWDRA-MG',
    os_build_number: 'DRA-LX3 1.0.0.139(C69)'
  },
  me: {
    server: 'c.us',
    user: 'XXXXXXXXXXX',
    _serialized: 'XXXXXXXXXXX@c.us'
  }
}

Steps To Reproduce

client.getMe()

create() code

{
  headless: true,
  multiDevice: false,
  useChrome: true,
  qrTimeout: 0,
}

DEBUG INFO

{
  "WA_VERSION": "2.2208.7",
  "PAGE_UA": "WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
  "WA_AUTOMATE_VERSION": "4.32.0",
  "BROWSER_VERSION": "HeadlessChrome/99.0.4844.51",
  "OS": "Windows 10",
  "START_TS": 1646876511096
}

Environment

- OS: Windows/Ubtuntu
- Node: 16.13.2
- npm: 8.1.2

Screenshots/Logs

No response

Anything else?

No response

smashah commented 2 years ago

Please be careful with what data you add here!!!!!

MD will naturally be missing some information (like battery). What exact property do you need in MD that is not already being returned??

edgaru commented 2 years ago

True, I will adapt my bots to this new information, but the whatsapp version would be very useful.

smashah commented 2 years ago

@edgaru I checked, not possible on MD.