Skip to content

Missing Event / API Support for WhatsApp Community “Suggested Groups” #2536

Description

@shelomito12

Summary

There is currently no way in Baileys to detect, intercept, or programmatically manage “suggested groups” within WhatsApp Communities. This creates a significant gap for moderation, automation, and security workflows.


Problem Description

In WhatsApp Communities, when the setting “Only admins can add new groups” is enabled:

  • Non-admin members cannot directly add groups

  • However, they can still suggest groups for admin approval

These suggested groups appear in a pending approval queue in the mobile app UI.


Observed Behavior (Baileys)

When a user suggests a group:

  • ❌ No groups.upsert event is emitted

  • ❌ No groups.update event is emitted

  • ❌ No chats.upsert or related event

  • ❌ No app-state sync mutation is observed

  • ❌ No trace in event logs whatsoever

This has been verified through detailed logging around the exact timestamps of suggestion activity.


Important Distinction

Action | Visibility in Baileys -- | -- Suggest group (pending approval) | ❌ Not visible Group approved and linked | ✅ Visible (sometimes via groups.upsert) Participant updates | ✅ Visible (if bot is in group)

This indicates that group suggestions exist only in mobile client UI state and are not propagated through the WhatsApp Web protocol that Baileys relies on.


Why This Is a Problem

This limitation prevents developers from:

  • Detecting who suggested a group

  • Detecting when a group was suggested

  • Automatically approving/rejecting suggestions

  • Building moderation workflows

  • Enforcing policy or governance rules

In practice, this creates a blind spot where:

  1. A non-admin suggests a group

  2. Admin approves (manually, possibly without full context)

  3. Group becomes part of the community

  4. Only after this point does Baileys gain visibility

By then, it may already be too late for preventive action.


Current Workarounds (Limited)

Developers are forced to rely on post-facto mitigation, such as:

  • Listening to groups.upsert

  • Fetching metadata via groupMetadata

  • Checking metadata.owner

  • Removing group via:

    sock.communityUnlinkGroup(groupJid, communityJid)
    

However:

  • This only works after approval

  • It does not prevent initial exposure

  • It introduces latency in enforcement


Additional Constraints

  • group-participants.update only works if the bot is already inside the group

  • There is no way to inspect the pending suggestions queue

  • No API exists to:

    • list suggestions

    • approve/reject suggestions

    • subscribe to suggestion events


Feature Request

Expose support for Community group suggestions via one or more of the following:

1. Event Emission

A new event such as:

sock.ev.on('community.group.suggested', (data) => { ... })

With payload:

{
  communityJid: string
  groupJid: string
  suggestedBy: string
  timestamp: number
  subject?: string
}

2. Suggestion Management API

Methods such as:

sock.communityFetchGroupSuggestions(communityJid)
sock.communityApproveGroupSuggestion(groupJid, communityJid)
sock.communityRejectGroupSuggestion(groupJid, communityJid)

3. App-State Exposure

If suggestions are part of internal app-state patches, expose them via:

  • app-state.sync hooks

  • or a dedicated namespace


Expected Impact

Adding this capability would enable:

  • Automated moderation systems

  • Policy enforcement (e.g. trusted creators only)

  • Security controls

  • Better observability for community management

  • Reduced reliance on manual admin workflows


Environment

  • Baileys version: latest (as of testing)

  • WhatsApp Web protocol via Baileys

  • Communities feature enabled

  • Setting: “Only admins can add new groups”


Closing Notes

This is not a minor edge case—it is a structural limitation affecting any system attempting to build governance or automation on top of WhatsApp Communities.

Currently, there is no way to observe or control group suggestions, which makes it impossible to implement proactive moderation.


Would appreciate clarification on whether:

  1. This is a known limitation of the WhatsApp Web protocol

  2. There are plans to support this in Baileys

  3. There are undocumented workarounds or experimental hooks

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions