[WEBJS] - Incorret group participants data
Describe the bug
The POST /api/{session}/groups/refresh endpoint does not seem to refresh chats/groups metadata properly.
A WAHA session was already in WORKING state.
Scenario:
- a participant joins the group
- the REST endpoints correctly return the participant
- shortly after, the participant leaves the group
- the REST endpoints continue returning stale participant data
The following endpoints did not reflect the real group state:
GET /groups/{groupId}GET /groups/{groupId}/participants/v2
even after calling:
POST /api/{session}/groups/refresh
multiple times.
This makes it impossible to reliably use WAHA REST endpoints as the source of truth for group participants/admins.
Version
{
"version": "2026.4.3",
"engine": "WEBJS",
"tier": "PLUS",
"browser": "/usr/bin/google-chrome",
"platform": "linux/x64",
"worker": {
"id": null
}
}
Steps
To Reproduce
-
Create or use an existing WhatsApp group
-
Start a WAHA session using
WEBJS -
Ensure the session state is
WORKING -
Add a participant to the group
-
Confirm the participant appears correctly in:
GET /groups/{groupId}GET /groups/{groupId}/participants/v2
-
Remove or make the participant leave the group
-
Call:
POST /api/{session}/groups/refresh
- Then call:
GET /api/{session}/groups/{groupId}
and/or
GET /api/{session}/groups/{groupId}/participants/v2
- Observe that the removed participant still appears in the response
Expected behavior
After a participant leaves the group and after calling the refresh endpoint, group metadata and participants endpoints should reflect the current WhatsApp group state.
The removed participant should no longer appear in:
GET /groups/{groupId}
and
GET /groups/{groupId}/participants/v2
Requests - Responses
Refresh request
POST /api/default/groups/refresh
Response:
{
"success": true
}
Participants request
GET /api/default/groups/[email protected]/participants/v2
Response:
[
{
"id": "[email protected]",
"role": "participant"
},
{
"id": "[email protected]",
"role": "participant"
}
]
Expected:
[
{
"id": "[email protected]",
"role": "participant"
}
]
Docker Logs
No relevant errors appear in docker logs.
Screenshots
N/A
Additional context
This issue seems related to stale synchronization/cache inside the WEBJS engine.
The issue specifically happens after a participant leaves the group.
The problem persists even after:
- calling refresh multiple times
- waiting several seconds/minutes
- reconnecting the session
Also reproduced with:
GET /groups/{groupId}GET /groups/{groupId}/participants/v2
The returned data does not match the actual WhatsApp group state.