mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 12:22:21 -06:00
feat: route to send Sticker
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
mediaMessageSchema,
|
||||
pollMessageSchema,
|
||||
reactionMessageSchema,
|
||||
stickerMessageSchema,
|
||||
textMessageSchema,
|
||||
} from '../../validate/validate.schema';
|
||||
import {
|
||||
@@ -21,6 +22,7 @@ import {
|
||||
SendMediaDto,
|
||||
SendPollDto,
|
||||
SendReactionDto,
|
||||
SendStickerDto,
|
||||
SendTextDto,
|
||||
} from '../dto/sendMessage.dto';
|
||||
import { sendMessageController } from '../whatsapp.module';
|
||||
@@ -131,6 +133,16 @@ export class MessageRouter extends RouterBroker {
|
||||
sendMessageController.sendLinkPreview(instance, data),
|
||||
});
|
||||
|
||||
return res.status(HttpStatus.CREATED).json(response);
|
||||
})
|
||||
.post(this.routerPath('sendSticker'), ...guards, async (req, res) => {
|
||||
const response = await this.dataValidate<SendStickerDto>({
|
||||
request: req,
|
||||
schema: stickerMessageSchema,
|
||||
ClassRef: SendStickerDto,
|
||||
execute: (instance, data) => sendMessageController.sendSticker(instance, data),
|
||||
});
|
||||
|
||||
return res.status(HttpStatus.CREATED).json(response);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user