Skip to content

Commit 68c6ad4

Browse files
Merge pull request EvolutionAPI#1211 from joaosouz4dev/main
feat: notconvertsticket for animated stickers
2 parents 8685f2f + 95401cf commit 68c6ad4

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.git
22
*Dockerfile*
33
*docker-compose*
4+
package-lock.json
5+
.env
46
node_modules
57
dist

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM node:20-alpine AS builder
22

33
RUN apk update && \
4-
apk add git ffmpeg wget curl bash openssl
4+
apk add --no-cache git ffmpeg wget curl bash openssl
55

66
LABEL version="2.2.3" description="Api to control whatsapp features through http requests."
77
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"

src/api/dto/sendMessage.dto.ts

+1
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

+3-1
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,9 @@ export class BaileysStartupService extends ChannelStartupService {
27442744

27452745
if (file) mediaData.sticker = file.buffer.toString('base64');
27462746

2747-
const convert = await this.convertToWebP(data.sticker);
2747+
const convert = data?.notConvertSticker
2748+
? Buffer.from(data.sticker, 'base64')
2749+
: await this.convertToWebP(data.sticker);
27482750
const gifPlayback = data.sticker.includes('.gif');
27492751
const result = await this.sendMessageWithTyping(
27502752
data.number,

0 commit comments

Comments
 (0)