Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.on('group_join) and .on('group_membership_request') are no longer working #3188

Open
1 task done
jacobbinnie opened this issue Jul 9, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@jacobbinnie
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hey there,

I'm working with simple WhatsApp group chats and I've noticed the .on('group_join) and .on('group_membership_request') are not working. Most other listeners seem to be working fine for group chats.

Anyone got a fix for this?

Jacob

Expected behavior

As a user, I expected to be able to log a message or at least see the event being triggered.

Steps to Reproduce the Bug or Issue

  1. Connect and initialize a WhatsApp client that is an admin of your group chat
  2. Request to join the group chat from another WhatsApp number
  3. No event is fired for either of the listeners

Relevant Code

client.on('group_membership_request', (event) => {
              console.log('Group membership request:', event);
            });

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

whatsapp-web.js version: 2.3000.1014748697

Additional context

No response

@jacobbinnie jacobbinnie added the bug Something isn't working label Jul 9, 2024
@warleysr
Copy link

Hey @jacobbinnie. I was facing the same issue and realized that it was solved in the last 1.24.0 version with #2813. I updated my module but it started to break, so I downgraded to version 1.23.1-alpha.5 and edited the Client.js file applying the same one line change of the PR and it is working fine.

My code looks like this:

const wwebVersion = '2.3000.1015010030-alpha';
const client = new Client({
    puppeteer: {
        args: ['--no-sandbox', '--disable-setuid-sandbox'],
    },
    authStrategy: new LocalAuth(
        {dataPath: 'wppSessionData'}
    ),
   webVersionCache: {
       type: 'remote',
       remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
   }
});

client.on('group_membership_request', async (notification) => {
    console.log('NEW REQUEST: ' + notification.chatId);
    client.approveGroupMembershipRequests(notification.chatId);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants