Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(engine): report group creation as unsupported on whatsapp-web.js

Yudhi Armyndharis2660ca2f544e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5ce59b8d6..e45db8fea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The JavaScript, Python, PHP, Go and Java SDKs expose `POST /sessions/:sessionId/calls/link`, which creates a shareable WhatsApp call link. `startTime` is absolute epoch milliseconds and is required, so a link for right now carries the current timestamp rather than an omitted field.
- The JavaScript, Python, PHP, Go and Java SDKs expose the two channel administration routes — demote an admin back to a subscriber, and transfer ownership. Both need an `OPERATOR` key, the transfer is irreversible, and the whatsapp-web.js engine answers `501` for either.
+### Changed
+
+- ⚠️ **Breaking (behavior).** `POST /sessions/:sessionId/groups` answers `501` on the whatsapp-web.js engine instead of attempting the creation. whatsapp-web.js still declares `createGroup`, but its page code reaches a WhatsApp Web internal that no longer exists, so every call already failed — as an opaque `500` rather than a stated refusal. Measured against a live session on two WhatsApp Web builds, one auto-resolved and one pinned, with the same `TypeError`; bare and `@c.us`-qualified participant ids fail identically. Action required: create groups through the Baileys engine, which is unaffected. The route, its body and its Baileys behaviour are unchanged.
+
### Fixed
- `docs/29`'s architecture diagram counted four whatsapp-web.js patches and one Baileys patch while this release shipped a fifth and a second, and `🔧⁷` marked no cell, so the three whatsapp-web.js participant writes read as working against a stock library. The patch counts are now derived from `scripts/` by `docs-29-counts.spec.ts`, which bound only the interface figures before. `docs/09` §9.6 also omitted the two gates added to CI and described the release workflow as a lighter gate than the one it now runs.
diff --git a/docs/29-engine-capability-matrix.md b/docs/29-engine-capability-matrix.md
index 43d7a1819..15ca18c2c 100644
--- a/docs/29-engine-capability-matrix.md
+++ b/docs/29-engine-capability-matrix.md
@@ -280,7 +280,7 @@ socket is caught by the transport instead. No REST route: the session watchdog p
| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
| -------------------------------- | ------------------- | ------------------ | --------------- |
-| `createGroup` | ✅ | ✅ | ✅ |
+| `createGroup` | ✅ | ❌ | ✅ |
| `getGroups` | ✅ | ✅ | ✅ |
| `getGroupInfo` | ✅ | ✅ | ✅ |
| `addParticipants` | ✅ | ✅ | ✅ |
@@ -375,8 +375,8 @@ answers 501.
| `rejectCall` | ✅ | ✅ | ✅ |
| `createCallLink` | ✅ | ✅ | ✅ |
-**Totals:** 112 methods → 224 adapter cells: **200 ✅, 24 ❌** (2 adapter-gaps, 22
-library-limitations, 0 uncertain) across 23 methods. From the REST caller's side: **91** methods
+**Totals:** 112 methods → 224 adapter cells: **199 ✅, 25 ❌** (2 adapter-gaps, 23
+library-limitations, 0 uncertain) across 24 methods. From the REST caller's side: **90** methods
work on any engine (89 fully supported + 2 store-backed status reads), **11** are Baileys-only,
**9** are wwjs-only (the 2 store-backed rows excluded), **1** (`sendCatalog`) is 501 on both.
@@ -664,7 +664,7 @@ with zero OpenWA surface. Baileys-only; whatsapp-web.js has no community API at
| -------------------------------- | ----------------------------------- |
| `acceptInvite` | ✅ `joinGroupViaInviteCode` |
| `approveGroupMembershipRequests` | ✅ `approveGroupMembershipRequests` |
-| `createGroup` | ✅ `createGroup` |
+| `createGroup` | ❌ not-available (29.6.2) |
| `getCommonGroups` | ❌ **not exposed** |
| `getGroupMembershipRequests` | ✅ `getGroupMembershipRequests` |
| `getInviteInfo` | ✅ `getGroupJoinInfo` |
@@ -814,7 +814,7 @@ OpenWA consumes events by normalizing them into `EngineEventCallbacks`; anything
| `group_leave` | ✅ | | `group_update` | ✅ |
| `group_membership_request` | ✅ | | | |
-## 29.6 The 24 not-available cells in detail
+## 29.6 The 25 not-available cells in detail
Every ❌ in 29.4, with the exact library symbol inspected (full evidence strings:
`engine-capability-matrix.ts`). All of these throw `EngineNotSupportedError` → HTTP 501 at the
@@ -837,22 +837,23 @@ adapter boundary — none silently stubs.
| `sendCatalog` | lib | `AnyMessageContent` (`Types/Message.d.ts:166-210`) has only `{product}` (single product); the catalog CRUD nodes (`Socket/business.js:294-362`) mutate the catalog, they don't send it. |
| `votePoll` | lib | No vote-send helper at all; the library only _decrypts incoming_ votes (`decryptPollVote`). Sending needs a hand-built `proto.Message.PollUpdateMessage` with HMAC-SHA256 encryption keyed by the poll creation's `messageSecret`. |
-### 29.6.2 wwjs adapter (12 cells)
-
-| Method | Cause | What's missing (evidence) |
-| -------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `subscribeToChannel` | gap | `Client.subscribeToChannel(channelId)` (`Client.js:2542`) takes a channel **id** and resolves a boolean — it cannot satisfy the subscribe-by-invite-code contract alone. Correct wiring is two-step: `getChannelByInviteCode(inviteCode)` (`Client.js:1716`) → `subscribeToChannel(channel.id)`, unverified against a live session (the previous one-step call was a phantom success). The one remaining wwjs adapter-gap. |
-| `demoteChannelAdmin` | lib | `Client.demoteChannelAdmin` exists (`index.d.ts:35`) but its page body calls `window.require('WAWebDemoteNewsletterAdminAction').demoteNewsletterAdmin` (`Client.js:1907-1925`), and a module probe on a live session (Web `2.3000.1044824727-alpha`, unpinned) returned that module resolving with `demoteNewsletterAdmin: undefined`. The sibling path used inside `transferChannelOwnership` (`WAWebNewsletterDemoteAdminJob.demoteNewsletterAdminAction`) is undefined too, so there is nothing to retarget. Baileys serves this capability. |
-| `transferChannelOwnership` | lib | `Client.transferChannelOwnership` exists (`index.d.ts:375`) and its page function `WAWebChangeNewsletterOwnerAction.changeNewsletterOwnerAction` is present, but on Web `2.3000.1044824727-alpha` it rejects every call **locally** with `contact-not-found-in-newsletter-subscriber-list` — 4-9ms against a 352-531ms known-server baseline measured in the same page, so it never reaches WhatsApp. Unchanged by subscribing the target, promoting it to admin, or restarting the session; the only repopulation path, `WAWebCollections.NewsletterMetadataCollection.update`, is `undefined`. Baileys serves this capability. |
-| `upsertLabel` | lib | 1.34.7 reads labels and assigns them (`getLabels`, `getLabelById`, `getChatLabels`, `getChatsByLabelId`, `addOrRemoveLabels`, `index.d.ts:129-154`) but exposes nothing that creates/edits a label definition. |
-| `deleteLabel` | lib | Same as above. |
-| `subscribeToPresence` | lib | Only `sendPresenceAvailable`/`sendPresenceUnavailable` (`index.d.ts:230,233`), which publish the _account's own_ presence; no subscribe call and no presence event is emitted. |
-| `getCatalog` | lib | No `Client.getCatalog` in `index.d.ts` (0 hits); `Product`/`Order` are inbound-only parsers. |
-| `getProducts` | lib | Same as above. |
-| `getProduct` | lib | Only page-internal `getProductMetadata` (`Utils.js:1290`), not a public Client fn. |
-| `sendProduct` | lib | No outbound product content type. |
-| `sendCatalog` | lib | No `Client.sendCatalog` in `index.d.ts` (0 hits). |
-| `setGroupEphemeral` | lib | No disappearing-timer setter (0 hits for `ephemeral` in `index.d.ts`); only the create-time `messageTimer` option (`Client.js:2328`). |
+### 29.6.2 wwjs adapter (13 cells)
+
+| Method | Cause | What's missing (evidence) |
+| -------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `subscribeToChannel` | gap | `Client.subscribeToChannel(channelId)` (`Client.js:2542`) takes a channel **id** and resolves a boolean — it cannot satisfy the subscribe-by-invite-code contract alone. Correct wiring is two-step: `getChannelByInviteCode(inviteCode)` (`Client.js:1716`) → `subscribeToChannel(channel.id)`, unverified against a live session (the previous one-step call was a phantom success). The one remaining wwjs adapter-gap. |
+| `createGroup` | lib | `Client.createGroup` exists and is typed `Promise<CreateGroupResult \| string>`, but its injected evaluate reaches a WhatsApp Web internal that no longer exposes `findImpl` (`Client.js:2325`). Measured live on **two** builds — `2.3000.1044858477-alpha` auto-resolved and `2.3000.1044770897-alpha` pinned — both `TypeError: this.findImpl is not a function`, reaching the caller as a bare 500. Bare and `@c.us`-qualified participant ids fail identically, so the id shape is not the variable; varying the build is what separates this from registry pin drift. `findImpl` is in neither the installed `Client.js` nor any OpenWA patcher, so it belongs to the page and cannot be patched around. Baileys serves this capability. |
+| `demoteChannelAdmin` | lib | `Client.demoteChannelAdmin` exists (`index.d.ts:35`) but its page body calls `window.require('WAWebDemoteNewsletterAdminAction').demoteNewsletterAdmin` (`Client.js:1907-1925`), and a module probe on a live session (Web `2.3000.1044824727-alpha`, unpinned) returned that module resolving with `demoteNewsletterAdmin: undefined`. The sibling path used inside `transferChannelOwnership` (`WAWebNewsletterDemoteAdminJob.demoteNewsletterAdminAction`) is undefined too, so there is nothing to retarget. Baileys serves this capability. |
+| `transferChannelOwnership` | lib | `Client.transferChannelOwnership` exists (`index.d.ts:375`) and its page function `WAWebChangeNewsletterOwnerAction.changeNewsletterOwnerAction` is present, but on Web `2.3000.1044824727-alpha` it rejects every call **locally** with `contact-not-found-in-newsletter-subscriber-list` — 4-9ms against a 352-531ms known-server baseline measured in the same page, so it never reaches WhatsApp. Unchanged by subscribing the target, promoting it to admin, or restarting the session; the only repopulation path, `WAWebCollections.NewsletterMetadataCollection.update`, is `undefined`. Baileys serves this capability. |
+| `upsertLabel` | lib | 1.34.7 reads labels and assigns them (`getLabels`, `getLabelById`, `getChatLabels`, `getChatsByLabelId`, `addOrRemoveLabels`, `index.d.ts:129-154`) but exposes nothing that creates/edits a label definition. |
+| `deleteLabel` | lib | Same as above. |
+| `subscribeToPresence` | lib | Only `sendPresenceAvailable`/`sendPresenceUnavailable` (`index.d.ts:230,233`), which publish the _account's own_ presence; no subscribe call and no presence event is emitted. |
+| `getCatalog` | lib | No `Client.getCatalog` in `index.d.ts` (0 hits); `Product`/`Order` are inbound-only parsers. |
+| `getProducts` | lib | Same as above. |
+| `getProduct` | lib | Only page-internal `getProductMetadata` (`Utils.js:1290`), not a public Client fn. |
+| `sendProduct` | lib | No outbound product content type. |
+| `sendCatalog` | lib | No `Client.sendCatalog` in `index.d.ts` (0 hits). |
+| `setGroupEphemeral` | lib | No disappearing-timer setter (0 hits for `ephemeral` in `index.d.ts`); only the create-time `messageTimer` option (`Client.js:2328`). |
## 29.7 Caveats on supported rows
@@ -909,13 +910,13 @@ adapter boundary — none silently stubs.
Recomputed from `engine-capability-matrix.ts`, `upstream-surface.snapshot.json`, and a scan of the
adapter sources — re-derive the same way when anything changes:
-- **112** interface methods → **224** adapter cells: **200 ✅** / **24 ❌** (2 adapter-gaps, 22
+- **112** interface methods → **224** adapter cells: **199 ✅** / **25 ❌** (2 adapter-gaps, 23
library-limitations, 0 uncertain), spanning **23** methods.
-- Of the 200 ✅ cells, **6 wwjs cells carry an explicit patch dependency** (4 × 🔧² status send,
+- Of the 199 ✅ cells, **6 wwjs cells carry an explicit patch dependency** (4 × 🔧² status send,
1 × 🔧³ channel link preview, 1 × 🔧⁴ ready-sync) and the whole wwjs column additionally
depends on 🔧¹, the whole Baileys column on 🔧⁵ — so every row rests on a patch on each side,
even though no row carries a row-level mark on both.
-- REST caller's view: **91** engine-neutral (89 + 2 store-backed status reads), **11** Baileys-only,
+- REST caller's view: **90** engine-neutral (88 + 2 store-backed status reads), **12** Baileys-only,
**9** wwjs-only, **1** unavailable on both (`sendCatalog`).
- Full engine inventory (29.5), split by the exposure legend rather than lumped: Baileys **152**
socket methods — 49 wired into interface methods, 5 internal wiring, 29 plumbing, **69 ❌ not
diff --git a/openapi.json b/openapi.json
index 631d5bd74..cf9cc515a 100644
--- a/openapi.json
+++ b/openapi.json
@@ -916,6 +916,9 @@
},
"409": {
"description": "The session is not connected — an engine exists for it but is not `ready`: disconnected, reconnecting, or still initializing, so the request never reached WhatsApp. Wait for `ready` and retry. A session that was never started answers `400` instead, and the session lifecycle routes answer `409` for a conflicting state rather than this. One window answers this while the session still reads `ready`: WhatsApp Web periodically reloads its own page and the engine re-injects into it — for those few seconds the answer is a `409` naming the reload; retry shortly."
+ },
+ "501": {
+ "description": "Not supported by the active engine: whatsapp-web.js reaches a WhatsApp Web internal that no longer exists, so group creation is Baileys-only."
}
},
"summary": "Create a new group",
diff --git a/src/engine/adapters/whatsapp-web-js.adapter.spec.ts b/src/engine/adapters/whatsapp-web-js.adapter.spec.ts
index 585bac567..b282094b4 100644
--- a/src/engine/adapters/whatsapp-web-js.adapter.spec.ts
+++ b/src/engine/adapters/whatsapp-web-js.adapter.spec.ts
@@ -4739,7 +4739,7 @@ describe('WhatsAppWebJsAdapter message_ack (unreadable id)', () => {
});
});
-describe('WhatsAppWebJsAdapter createGroup (failure shapes)', () => {
+describe('WhatsAppWebJsAdapter createGroup (not available on this engine)', () => {
const readyAdapter = (client: unknown): WhatsAppWebJsAdapter => {
const adapter = new WhatsAppWebJsAdapter({ sessionId: 's', sessionDataPath: './data/sessions', puppeteer: {} });
(adapter as unknown as { status: EngineStatus }).status = EngineStatus.READY;
@@ -4747,35 +4747,24 @@ describe('WhatsAppWebJsAdapter createGroup (failure shapes)', () => {
return adapter;
};
- it("surfaces the engine's reason when creation fails", async () => {
- // whatsapp-web.js RESOLVES with a plain string on failure rather than throwing (Client.js:2376).
- // Reading `.gid` off it produced an opaque TypeError and threw the actual reason away.
- const createGroup = jest
- .fn()
- .mockResolvedValue('CreateGroupError: An unknown error occupied while creating a group');
+ // The library's own method is typed and present, so the only thing that shows it cannot work is a
+ // live call: its injected evaluate reaches a WhatsApp Web internal with no `findImpl`
+ // (`Client.js:2325`), which reached callers as a bare 500. Measured on two builds — one
+ // auto-resolved, one pinned — so this is a library limitation, not registry pin drift.
+ it('throws EngineNotSupportedError instead of calling the library', async () => {
+ const createGroup = jest.fn();
- await expect(readyAdapter({ createGroup }).createGroup('team', ['[email protected]'])).rejects.toThrow(
- /CreateGroupError/,
+ await expect(readyAdapter({ createGroup }).createGroup('team', ['[email protected]'])).rejects.toBeInstanceOf(
+ EngineNotSupportedError,
);
+ // The point of the demotion: the caller gets a 501 and the broken page call is never made.
+ expect(createGroup).not.toHaveBeenCalled();
});
- it('never returns a placeholder when the group id cannot be read', async () => {
- // The old `String(gid._serialized)` coerced an unreadable id into the literal string "undefined"
- // and handed it back as a real, addressable group id.
- const createGroup = jest.fn().mockResolvedValue({ gid: { someFutureName: 'x' } });
-
- const call = readyAdapter({ createGroup }).createGroup('team', ['[email protected]']);
-
- await expect(call).rejects.toThrow(/id could not be read/);
- await expect(call).rejects.not.toThrow(/undefined/);
- });
-
- it('returns the group on success', async () => {
- const createGroup = jest.fn().mockResolvedValue({ gid: { _serialized: '[email protected]' } });
-
- const res = await readyAdapter({ createGroup }).createGroup('team', ['[email protected]', '[email protected]']);
+ it('refuses before the engine is ready, like every other guarded method', async () => {
+ const adapter = new WhatsAppWebJsAdapter({ sessionId: 's', sessionDataPath: './data/sessions', puppeteer: {} });
- expect(res).toEqual({ id: '[email protected]', name: 'team', participantsCount: 2 });
+ await expect(adapter.createGroup('team', ['[email protected]'])).rejects.toBeDefined();
});
});
diff --git a/src/engine/adapters/wwebjs-groups.ts b/src/engine/adapters/wwebjs-groups.ts
index 84f9192f0..29d4bc0f2 100644
--- a/src/engine/adapters/wwebjs-groups.ts
+++ b/src/engine/adapters/wwebjs-groups.ts
@@ -10,7 +10,7 @@ import {
GroupParticipant,
ParticipantOperationResult,
} from '../interfaces/whatsapp-engine.interface';
-import { GroupChat, GroupMetadataRaw, GroupCreateResult, SerializedWid, readWid } from '../types/whatsapp-web-js.types';
+import { GroupChat, GroupMetadataRaw, SerializedWid, readWid } from '../types/whatsapp-web-js.types';
import { toParticipantWid } from '../identity/wa-id';
import { EngineRefusedError } from '../../common/errors/engine-refused.error';
import { EngineTransportError } from '../../common/errors/engine-transport.error';
@@ -159,31 +159,29 @@ export class WwebjsGroups {
}
}
- async createGroup(name: string, participants: string[]): Promise<Group> {
+ /**
+ * Not available on this engine, despite `Client.createGroup` existing and being typed
+ * `Promise<CreateGroupResult | string>` (`index.d.ts`).
+ *
+ * Its page body reaches a WhatsApp Web internal that no longer exposes `findImpl`
+ * (`Client.js:2325`, inside the injected evaluate). Measured against a live session on two
+ * different WhatsApp Web builds — `2.3000.1044858477-alpha` auto-resolved from the registry, and
+ * `2.3000.1044770897-alpha` pinned explicitly — with identical results:
+ * `TypeError: this.findImpl is not a function`, reaching the caller as a bare 500. Bare and
+ * `@c.us`-qualified participant ids fail the same way, so the id shape is not the variable.
+ *
+ * The build was varied deliberately because this registry pin moves on its own between restarts;
+ * two builds failing the same way is what separates a library limitation from build drift. The
+ * Baileys engine creates groups normally on the same account.
+ *
+ * Nothing here can be patched around: `findImpl` belongs to the page, not to whatsapp-web.js —
+ * it appears in neither the installed `Client.js` nor any OpenWA patcher. Restore this method
+ * when upstream adopts a page API that WhatsApp Web still provides.
+ */
+ /* eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars */
+ async createGroup(_name: string, _participants: string[]): Promise<Group> {
this.host.ensureReady();
- // Ensure participant IDs are in correct format
- const participantIds = participants.map(toParticipantWid);
- const result = await this.client().createGroup(name, participantIds);
-
- // whatsapp-web.js reports a failed creation by RESOLVING with a plain string
- // ('CreateGroupError: …', Client.js:2376) rather than throwing, and its own typings say so
- // (`Promise<CreateGroupResult | string>`). Reading `.gid` straight off that string threw an opaque
- // TypeError and discarded the reason upstream actually gave us; surface it instead.
- if (typeof result === 'string') {
- throw new Error(result);
- }
- const gid = (result as unknown as GroupCreateResult).gid as SerializedWid | undefined;
- const groupId = readWid(gid);
- // A group id is not ack-safe the way a message id is: there is no empty-sentinel equivalent, and any
- // placeholder would be handed back as a real, addressable group. Fail instead of inventing one.
- if (!groupId) {
- throw new Error('the group was created but its id could not be read');
- }
- return {
- id: groupId,
- name: name,
- participantsCount: participants.length,
- };
+ throw new EngineNotSupportedError('createGroup');
}
async addParticipants(groupId: string, participants: string[]): Promise<ParticipantOperationResult[]> {
diff --git a/src/engine/engine-capability-matrix.ts b/src/engine/engine-capability-matrix.ts
index 5d578ee12..434111163 100644
--- a/src/engine/engine-capability-matrix.ts
+++ b/src/engine/engine-capability-matrix.ts
@@ -106,7 +106,12 @@ export const ENGINE_CAPABILITY_MATRIX: Record<string, MethodCapability> = {
evidence:
'wwjs Chat.clearMessages() → boolean (index.d.ts:1896); the injected sendClearChat returns false for an unknown chat (Injected/Utils.js:1220); baileys chatModify({clear:true,lastMessages}, jid) (Types/Chat.d.ts:75-78) — same last-message requirement as archiveChat, so a chat with no known history resolves false',
},
- createGroup: { wwjs: { status: 'supported' }, baileys: { status: 'supported' } },
+ createGroup: {
+ wwjs: { status: 'not-available', rootCause: 'library-limitation' },
+ baileys: { status: 'supported' },
+ evidence:
+ 'baileys groupCreate(subject, participants) → GroupMetadata (Socket/groups.d.ts). wwjs Client.createGroup exists and is typed Promise<CreateGroupResult | string> (index.d.ts) but its injected evaluate reaches a WhatsApp Web internal that no longer exposes findImpl (Client.js:2325) — measured live on TWO builds, 2.3000.1044858477-alpha auto-resolved and 2.3000.1044770897-alpha pinned, both TypeError "this.findImpl is not a function" reaching the caller as a bare 500. Bare and @c.us-qualified participant ids fail identically, so the id shape is not the variable, and varying the build is what separates this from registry pin drift. findImpl appears in neither the installed Client.js nor any OpenWA patcher, so it is the page\'s, not the library\'s, and cannot be patched around. Baileys creates groups normally on the same account',
+ },
deleteChat: { wwjs: { status: 'supported' }, baileys: { status: 'supported' } },
deleteContact: {
wwjs: { status: 'supported' },
diff --git a/src/modules/group/group.controller.ts b/src/modules/group/group.controller.ts
index d880ccd5c..71385e295 100644
--- a/src/modules/group/group.controller.ts
+++ b/src/modules/group/group.controller.ts
@@ -175,6 +175,11 @@ export class GroupController {
@ApiResponse({ status: 409, description: ENGINE_NOT_READY_409 })
@ApiResponse({ status: 403, description: ENGINE_REFUSED_403 })
@ApiResponse({ status: 400, description: PARTICIPANT_ID_400 })
+ @ApiResponse({
+ status: 501,
+ description:
+ 'Not supported by the active engine: whatsapp-web.js reaches a WhatsApp Web internal that no longer exists, so group creation is Baileys-only.',
+ })
async create(@Param('sessionId') sessionId: string, @Body() dto: CreateGroupDto) {
return this.groupService.createGroup(sessionId, dto.name, dto.participants);
}