Skip to content

Commit

Permalink
chore: Update Dockerfile and whatsapp.baileys.service.ts
Browse files Browse the repository at this point in the history
Update and modifications in Dockerfile and src/api/services/channels/whatsapp.baileys.service.ts files. These changes improve the performance and maintainability of the Node.js project.
  • Loading branch information
dgcode-tec committed Jul 3, 2024
1 parent b3a0899 commit 3637b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WORKDIR /evolution

COPY ./package.json ./tsconfig.json ./

RUN npm install --no-cache
RUN npm install

COPY ./src ./src
COPY ./public ./public
Expand Down Expand Up @@ -39,7 +39,7 @@ WORKDIR /evolution
COPY --from=builder /evolution/package.json ./package.json
COPY --from=builder /evolution/package-lock.json ./package-lock.json

RUN npm install --omit=dev --no-cache
RUN npm install --omit=dev

COPY --from=builder /evolution/dist ./dist
COPY --from=builder /evolution/prisma ./prisma
Expand Down
5 changes: 2 additions & 3 deletions src/api/services/channels/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ export class BaileysStartupService extends ChannelStartupService {
},
logger: P({ level: this.logBaileys }),
printQRInTerminal: false,
// ...browserOptions,
...browserOptions,
version,
markOnlineOnConnect: this.localSettings.alwaysOnline,
retryRequestDelayMs: 350,
Expand All @@ -601,7 +601,6 @@ export class BaileysStartupService extends ChannelStartupService {
connectTimeoutMs: 20_000,
keepAliveIntervalMs: 30_000,
qrTimeout: 45_000,
// defaultQueryTimeoutMs: undefined,
emitOwnEvents: false,
shouldIgnoreJid: (jid) => {
const isGroupJid = this.localSettings.groupsIgnore && isJidGroup(jid);
Expand All @@ -618,7 +617,7 @@ export class BaileysStartupService extends ChannelStartupService {
return this.historySyncNotification(msg);
},
userDevicesCache: this.userDevicesCache,
transactionOpts: { maxCommitRetries: 5, delayBetweenTriesMs: 2500 },
transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3000 },
patchMessageBeforeSending(message) {
if (
message.deviceSentMessage?.message?.listMessage?.listType === proto.Message.ListMessage.ListType.PRODUCT_LIST
Expand Down

0 comments on commit 3637b95

Please sign in to comment.