Skip to content

fix: fallback group node on extractCommunityMetadata#2425

Open
josecleiton wants to merge 1 commit intoWhiskeySockets:masterfrom
josecleiton:master
Open

fix: fallback group node on extractCommunityMetadata#2425
josecleiton wants to merge 1 commit intoWhiskeySockets:masterfrom
josecleiton:master

Conversation

@josecleiton
Copy link
Copy Markdown

Use group node as a fallback to fetch community metadata, preventing to access undefined

@whiskeysockets-bot
Copy link
Copy Markdown
Contributor

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@josecleiton/Baileys#master

# Yarn (v2+)
yarn add @whiskeysockets/baileys@josecleiton/Baileys#master

# PNPM
pnpm add @whiskeysockets/baileys@josecleiton/Baileys#master

If you encounter any issues or have feedback, feel free to comment as well.

@josecleiton
Copy link
Copy Markdown
Author

Before this change, methods such as communityUpdateDescription that rely on communityMetadata failed.

const communityId = community.attrs.id?.includes('@')
                                  ^

TypeError: Cannot read properties of undefined (reading 'attrs')
    at extractCommunityMetadata (/app/node_modules/baileys/src/Socket/communities.ts:444:32)
    ```

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

This PR is stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the Stale label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants