codespearhead / baileys-quickstart

The quickstart with Baileys®' WhatsApp Web API you've always wanted

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically recover from crash

codespearhead opened this issue · comments

If you keep the Baileys socket open for about a week, the application will crash after Baileys tries to send a message (see error below).

Since this is a bug, I'll prioritize it and then refactoring the project over adding new features such as #9 .

replying to [REDACTED]@s.whatsapp.net
recv messages  {
  "messages": [
    {
      "key": {
        "remoteJid": "[REDACTED]@s.whatsapp.net",
        "fromMe": true,
        "id": "[REDACTED]"
      },
      "message": {
        "extendedTextMessage": {
          "text": "Parece que sua mensagem possui mais que oito dígitos.\n\nSegue o link considerando apenas os oito últimos dígitos de sua mensagem:\n\nhttps://api.whatsapp.com/send?phone=[REDACTED]",
          "matchedText": "https://api.whatsapp.com/send?phone=[REDACTED]",
          "canonicalUrl": "https://api.whatsapp.com/send?phone=[REDACTED]",
          "description": "WhatsApp Messenger: More than 2 billion people\n          in over 180 countries use WhatsApp to stay in touch with friends and\n          family, anytime and anywhere. WhatsApp is free and offers simple, secure,\n          reliable messaging and calling, available on phones all over the world.",
          "title": "Share on WhatsApp",
          "previewType": "NONE",
          "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m233/up-oil-image-119db306-e771-4a3e-931c-98339a7bb134?ccb=9-4&oh=01_AdS-_Hu8SdatHdi4Ez_ReVy-PbG3j2MkDB8GhO4jPUiv7w&oe=6560EB49&_nc_sid=000000",
          "thumbnailSha256": "0MD7kF4yAgnpi+NgSXb1qTsozhlmVSFWjJpqwkxLrSM=",
          "thumbnailEncSha256": "X5XDG6/YsEAxNrofwUynwbSxn+8vlZ+9Ko/1ghQj1mU=",
          "mediaKey": "jwRsFGP7uFgWB4EfGK4i79uaVWZoGM4LcvOEyI6Q5mk=",
          "mediaKeyTimestamp": "1698270119",
          "thumbnailHeight": 0,
          "thumbnailWidth": 0
        }
      },
      "messageTimestamp": "1698270119",
      "status": "PENDING"
    }
  ],
  "type": "append"
}