wa-automate-nodejs icon indicating copy to clipboard operation
wa-automate-nodejs copied to clipboard

client.getGroupApprovalRequests(message.chat.id) returns empty

Open TVARecordings opened this issue 1 year ago • 0 comments

Are you using the latest version of the library?

  • [X] I have checked and am 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?

Business account

Mode

EASY API/CLI

Current Behavior

const PendingGroupApprovalRequests = await client.getGroupApprovalRequests(message.chat.id)
await sleep(5000)

returns an empty object, although there are 80 requests pending.

Expected Behavior

Expected a array of contact id's,

Steps To Reproduce

Run this code:

case 'handlegroupjoinrequest': if (isAdmin) { const PendingGroupApprovalRequests = await client.getGroupApprovalRequests(message.chat.id) await sleep(5000) console.log(PendingGroupApprovalRequests = ,PendingGroupApprovalRequests) await client.sendText(from, PendingGroupApprovalRequests = \n\n${JSON.stringify(PendingGroupApprovalRequests,null,2)}\n\n${PendingGroupApprovalRequests}) } break;

create() code OR full CLI command + CONFIG

No response

DEBUG INFO

{
  "WA_VERSION": "2.3000.1017469827",
  "WA_AUTOMATE_VERSION": "4.74.0",
  "BROWSER_VERSION": "Chrome/130.0.6723.58",
  "START_TS": 1729271896245,
  "RAM_INFO": "Total: 68.62 GB | Free: 50.10 GB",
  "PPTR_VERSION": "23.6.0",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "CACHED-3aa89",
  "LAUNCH_TIME_MS": 7866,
  "ACC_TYPE": "BUSINESS",
  "chats": 69,
  "messages": 165,
  "contacts": 6544,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "5f51ebc5-cbc5-477e-8e89-fce3b1615f42"
}

Environment

- OS: Windows 10
- Node: 20.16.0
- npm: 10.8.3

Screenshots/Logs

No response

Anything else?

No response

TVARecordings avatar Oct 18 '24 17:10 TVARecordings