Home / v1.6.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2020-05-24 1.5 kB
v1.6.0.tar.gz 2020-05-24 129.9 kB
v1.6.0.zip 2020-05-24 174.3 kB
Totals: 3 Items   305.7 kB 0

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.

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

Mute/Unmute Chats

You can now mute chats until a specified date

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

Send audio files as voice notes

:::js
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

Source: README.md, updated 2020-05-24