npm whatsapp-web.js 1.6.0
v1.6.0

3 years ago

This release introduces a couple new features and bug fixes.

Create MessageMedia from a file

This is a helper function to create a new MessageMedia from a local file in a much easier way. It will automatically take care of reading the file in base64, compute its mimetype and get the filename.

const media = MessageMedia.fromFilePath('./path/to/image.png');

Mute/Unmute Chats

You can now mute chats until a specified date

// mute until January 1, 2025
chat.mute(new Date('2025-01-01'));

Send audio files as voice notes

const media = MessageMedia.fromFilePath('./path/to/audio.mp3');
await chat.sendMessage(media, {sendAudioAsVoice: true});

Changelog

a80fcfa - update supported whatsapp web version to v2.2021.3
4beeab9 - feat: mute/unmute chats (#168)
cca74ec - docs: indicate return type for MessageMedia.fromFilePath
8b656c2 - fix: set thumbnail for media messages
4d09a4b - fix: media would stay stuck uploading when using the media option
eb82e80 - feat: Helper function to create MessageMedia from a local file path
f5a0de7 - fix: Wait for WhatsApp page load (#209)
d6637d6 - fix: visual glitch when sending message to new chat; no longer require at least one chat to have been created
4188734 - Ignore lock files
b062f9f - Update puppeteer to version 3.0.4
e528e8c - Update jsqr to version 1.3.1 (#185)
bcd02aa - set defaultViewPort option for puppeteer (#167)
686c99f - feat: send audio as voice note

Don't miss a new whatsapp-web.js release

NewReleases is sending notifications on new releases.