GET /api/{session}/groups returns object keyed by chatId on NOWEB, not an array
WAHA version: noweb:2026.8.2 Engine: NOWEB
Bug description: GET /api/{session}/groups returns an object keyed by chat ID ({"[email protected]": {...}, ...}) instead of an array, at least on the NOWEB engine. The endpoint's controller (src/api/groups.controller.ts#getGroups) returns session.getGroups(pagination) untyped (any), with no normalization and no documented/typed response shape.
This is already known internally: getGroupsCount() in the same codebase defensively handles both shapes:
Array.isArray(data) ? data : Object.values(data)
but the public getGroups endpoint itself does not apply the same normalization, so consumers naively doing Array.isArray(data) ? data : [] silently get an empty list even though groups exist.
Expected behavior: GET /groups should consistently return an array (matching the OpenAPI/Swagger expectation), regardless of engine — either by normalizing in the controller the same way getGroupsCount() already does, or by documenting the object-keyed shape explicitly with a proper TypeScript return type.
Steps to reproduce:
Run WAHA with WHATSAPP_DEFAULT_ENGINE=NOWEB. Connect a session with at least one WhatsApp group. Call GET /api/{session}/groups. Response is an object keyed by chat ID, not a JSON array.
Source: devlikeapro/waha