Hey bro, I found a critical bug in your modded version of the Baileys library.
The Issue: Whenever the sendMessage function is called with forwardedNewsletterMessageInfo inside the contextInfo (especially when sending Media like Images or Videos), the process crashes with: ReferenceError: isJidNewsletter is not defined
Where it's happening: The error is being thrown inside @whiskeysockets/baileys/lib/Socket/messages-send.js (around line 997) and @whiskeysockets/baileys/lib/Utils/messages.js.
The Cause: It looks like during the modding process to add the ai flag or other custom features, the helper function isJidNewsletter was called in the logic but was either:
Not imported from @whiskeysockets/baileys/lib/WABinary.
Or you removed the definition of isJidNewsletter from the WABinary utilities.
How to fix it: Please ensure that isJidNewsletter is properly exported in WABinary/jid-utils.js and correctly imported in the Socket and Utils folders. The standard Baileys library uses this to validate the newsletterJid field before uploading media to the WhatsApp servers.
Until this is fixed, we can't use Channel/Newsletter metadata with images on your mod. Let me know when you've patched it
Hey bro, I found a critical bug in your modded version of the Baileys library.
The Issue: Whenever the sendMessage function is called with forwardedNewsletterMessageInfo inside the contextInfo (especially when sending Media like Images or Videos), the process crashes with: ReferenceError: isJidNewsletter is not defined
Where it's happening: The error is being thrown inside @whiskeysockets/baileys/lib/Socket/messages-send.js (around line 997) and @whiskeysockets/baileys/lib/Utils/messages.js.
The Cause: It looks like during the modding process to add the ai flag or other custom features, the helper function isJidNewsletter was called in the logic but was either:
Not imported from @whiskeysockets/baileys/lib/WABinary.
Or you removed the definition of isJidNewsletter from the WABinary utilities.
How to fix it: Please ensure that isJidNewsletter is properly exported in WABinary/jid-utils.js and correctly imported in the Socket and Utils folders. The standard Baileys library uses this to validate the newsletterJid field before uploading media to the WhatsApp servers.
Until this is fixed, we can't use Channel/Newsletter metadata with images on your mod. Let me know when you've patched it