Skip to content

Commit 7c3fccb

Browse files
matheusmartinsInspermatheusmartinsInsper
authored andcommitted
feat: sendsticket notconvertsticket
1 parent 1d5e6cf commit 7c3fccb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/api/dto/sendMessage.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class Metadata {
4444
mentionsEveryOne?: boolean;
4545
mentioned?: string[];
4646
encoding?: boolean;
47+
notConvertSticker?: boolean;
4748
}
4849

4950
export class SendTextDto extends Metadata {

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,9 @@ export class BaileysStartupService extends ChannelStartupService {
23422342

23432343
if (file) mediaData.sticker = file.buffer.toString('base64');
23442344

2345-
const convert = await this.convertToWebP(data.sticker);
2345+
const convert = data?.notConvertSticker
2346+
? Buffer.from(data.sticker, 'base64')
2347+
: await this.convertToWebP(data.sticker);
23462348
const gifPlayback = data.sticker.includes('.gif');
23472349
const result = await this.sendMessageWithTyping(
23482350
data.number,

0 commit comments

Comments
 (0)