Skip to content

Conversation

KokeroO
Copy link
Contributor

@KokeroO KokeroO commented Oct 19, 2025

Evita o erro this.isZero() not is function

Summary by Sourcery

Bug Fixes:

  • Log messageSent object directly instead of JSON.stringify to avoid this.isZero() not is function error

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 19, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaced explicit JSON.stringify logging of the messageSent object with direct object logging to prevent prototype issues and resolve the this.isZero() not is function error.

Class diagram for updated logging in BaileysStartupService

classDiagram
class BaileysStartupService {
  +logger: Logger
  +sendDataWebhook(event: Events, messageRaw)
  ...
}
BaileysStartupService --> Logger: uses
BaileysStartupService --> Events: uses
Loading

File-Level Changes

Change Details Files
Simplified logging of messageSent object
  • Replaced JSON.stringify call with direct object logging
  • Removed pretty-print parameters (null, 2)
src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@DavidsonGomes DavidsonGomes merged commit e83a7e2 into EvolutionAPI:develop Oct 19, 2025
5 checks passed
milesibastos added a commit to chatwoot-br/evolution-api that referenced this pull request Oct 20, 2025
commit 48bda1b
Merge: e83a7e2 dd21a29
Author: Davidson Gomes <davidsongviolao@gmail.com>
Date:   Sun Oct 19 17:59:26 2025 -0300

    Merge pull request EvolutionAPI#2107 from KokeroO/develop

    fix( baileys.service ): Corrige ao salvar no DB valores Uint8Array

commit dd21a29
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 18:53:16 2025 +0000

    fix(baileys): salvar corretamente buffer no db

commit e83a7e2
Merge: cd71ff5 d58d0b8
Author: Davidson Gomes <davidsongviolao@gmail.com>
Date:   Sun Oct 19 06:41:28 2025 -0300

    Merge pull request EvolutionAPI#2105 from KokeroO/develop

    fix: Simplify logging of messageSent object

commit d58d0b8
Merge: 4efc9b6 cd71ff5
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 06:34:58 2025 -0300

    Merge branch 'EvolutionAPI:develop' into develop

commit 4efc9b6
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 06:34:45 2025 -0300

    Simplify logging of messageSent object

    Evita o erro de this.isZero not is function

commit cd71ff5
Merge: cdf0666 582166e
Author: Davidson Gomes <davidsongviolao@gmail.com>
Date:   Sun Oct 19 06:23:39 2025 -0300

    Merge pull request EvolutionAPI#2103 from KokeroO/develop

    feat(baileys,chatwoot,on-whatsapp-cache): implementações e correções na baileys e chatwoot

commit 582166e
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 05:41:55 2025 +0000

    fix(lint): lint

commit e1ae03c
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 05:37:22 2025 +0000

    fix(comments): comments fix

commit 0737c45
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 02:29:04 2025 -0300

    Update src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts

    Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

commit adbe107
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 02:28:45 2025 -0300

    Update src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts

    Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

commit 423f629
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 02:26:52 2025 -0300

    Update src/utils/onWhatsappCache.ts

    Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

commit 946dcae
Author: Willian Coqueiro <wil_kokero@hotmail.com>
Date:   Sun Oct 19 03:05:11 2025 +0000

    feat(baileys,chatwoot,on-whatsapp-cache): implementações e correções na baileys e chatwoot

    * corrige cache de números PN, LIDs e g.us para enviar o número correto
    * atualiza para os últimos commits da baileys
    * corrige envio de áudio e documentos via chatwoot no canal baileys
    * diversas correções na integração com chatwoot
    * corrige mensagens ignoradas no recebimento de leads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants