From 3a2205147c7b0750965712f7b83b2611ab74264b Mon Sep 17 00:00:00 2001 From: devlikepro Date: Tue, 8 Apr 2025 16:19:20 +0700 Subject: [PATCH] [core] API - deprecate /sendLinkPreview --- src/api/chatting.controller.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/api/chatting.controller.ts b/src/api/chatting.controller.ts index 3322e3e1..1505ebff 100644 --- a/src/api/chatting.controller.ts +++ b/src/api/chatting.controller.ts @@ -166,12 +166,6 @@ export class ChattingController { return whatsapp.sendLocation(request); } - @Post('/sendLinkPreview') - async sendLinkPreview(@Body() request: MessageLinkPreviewRequest) { - const whatsapp = await this.manager.getWorkingSession(request.session); - return whatsapp.sendLinkPreview(request); - } - @Post('/sendContactVcard') async sendContactVcard(@Body() request: MessageContactVcardRequest) { const whatsapp = await this.manager.getWorkingSession(request.session); @@ -236,4 +230,11 @@ export class ChattingController { const whatsapp = await this.manager.getWorkingSession(request.session); return whatsapp.reply(request); } + + @Post('/sendLinkPreview') + @ApiOperation({ deprecated: true }) + async sendLinkPreview_DEPRECATED(@Body() request: MessageLinkPreviewRequest) { + const whatsapp = await this.manager.getWorkingSession(request.session); + return whatsapp.sendLinkPreview(request); + } }