From f6004fd2949ceeb9ec99b1878642684c77bd7559 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Wed, 28 Jan 2026 17:58:22 +0700 Subject: [PATCH] [core] openapi - POST /api/{session}/presence chatId param fix #1842 --- src/structures/presence.dto.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/structures/presence.dto.ts b/src/structures/presence.dto.ts index ca189fd6..928958d5 100644 --- a/src/structures/presence.dto.ts +++ b/src/structures/presence.dto.ts @@ -1,4 +1,4 @@ -import { ApiProperty } from '@nestjs/swagger'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { WAHAPresenceStatus } from './enums.dto'; @@ -28,9 +28,10 @@ export class WAHAChatPresences { export class WAHASessionPresence { presence: WAHAPresenceStatus; - @ApiProperty({ - description: 'Chat ID - either group id or contact id', + @ApiPropertyOptional({ + description: + 'Chat ID - either group id or contact id. Required for chat-related presence statuses; omit for ONLINE/OFFLINE.', example: '11111111111@c.us', }) - chatId: string; + chatId?: string; }