Releases: wwebjs/whatsapp-web.js
v1.2.4 - Fix for downloading old media messages
Fixes an issue that occurred when attempting to download media for old messages, where action from the user is required to initiate the process.
8599a6d - fix: properly download media if it has not been loaded
v1.2.3 - Performance issue fix part 2
The same fix applied to the add message listener has now been applied to all event handlers.
4fe7fa9 - fix: delegate all event handlers
v1.2.2 - Performance issue fix
When starting up the client with lots of chats and messages, the way the event handler for getting new messages worked was creating a performance issue that caused WhatsApp Web to lag and act very slow, meaning the time it took to be able to respond to new messages was greatly increased.
Raw changelog
8bdecad - fix: don't call event handler for new messages directly to puppeteer
v1.2.1 - Fix fetch messages
v1.2.0 - Fetch chat messages, group events, state updates
Notable changes
Fetch chat messages
This release introduces a feature to fetch old chat messages via the use of Chat.fetchMessages(). By default it will return the last 50 messages, but a custom limit can be specified. This will automatically handle loading messages from the server if needed.
Group events
Event handlers for group events have also been added, allowing you to listen for user joins, user leaves and group settings updates via the group_join, group_leave and group_update events. The current supported GroupNotification types are the following:
- add: A user has been added to the chat by an admin.
- invite: A user has joined the chat by using an invitation link.
- remove: A user has been kicked from the chat by an admin.
- leave: A user has left the chat voluntarily.
- subject: The group subject has been changed.
- description: The group description has been changed.
- picture: The group picture has been changed.
- announce: The group settings option for "Send messages" has been modified. On/off in the body indicates if only admins can send messages in the chat or not.
- restrict: The group settings option for "Edit group info" has been modified. On/off in the body indicates if only admins can edit group subject, description and picture.
The events map to the following types:
- group_join: emitted when type is either
addorinvite. - group_leave: emitted when type is either
removeorleave. - group_update: all other types.
Simulate "typing..." and "recording audio..."
You can now do this using the sendStateTyping() and sendStateRecording() functions available on the Chat model. These will last for approximately 25 seconds and can be called again to refresh the timeout. A clearState() function is also available to immediately clear the typing or recording status.
Chats auto marked as seen
After this update, chats will be automatically marked as seen when a message is sent to it. If this is not the intended behavior, sendSeen: false can be set as part of the options object. You can also manually mark a conversation as seen by calling the sendSeen() function on the Chat.
Raw changelog
f34902d - chore: mark version v1.2.0
6e76fec - docs: add jsdoc strings for group events
98458f7 - feat : send conversation seen (#66)
48b9ae1 - feat: listen to group events (#90)
588dc93 - chore: added index.js for structures (#91)
16fe865 - feat: fetch chat messages
b07b38b - feat: Simulate recording audio in chat, clear recording/typing state, standardize chatstate change function names
d35f101 - feat: send typing in chat (#87)
72441be - feat(example): better session data save (#79)
794c9e1 - feat: force state update (#77)
05f57d2 - chore: bump version to v1.1.0-post
v1.1.0 - Delete chats/messages, detect message reads and more
This release introduces various functions that let you manage your chats:
- Chat.archive() / Chat.unarchive()
- Chat.clearMessages()
- Chat.delete()
- Message.delete()
Other notable changes
- Send messages to contacts that you haven't chatted with before
message_ackevent allows you to detect when your message has been sent, delivered, read or played- QR codes now auto refresh, in case you take too long to scan
Known issues
To start a chat with someone you haven't chatted before, you will need to have at least one chat open (with anybody).
Raw changelog
130da04 - chore: mark version v1.1.0
bb40218 - docs: use MessageAck type
ad3834e - Update MessageAck constant for consistency
e6ef592 - added ack constants and brief example
bb4ad11 - feat: added ACK events (#73)
60ee2ca - feat: delete chat, clear chat
132424e - feat: archive chats (#63)
5c9e76e - feat: refresh qr code (#68)
1c60c83 - feat: Delete messages
1840826 - feat : Check if the given number is a whatsapp number (#54)
6ade08e - feat: Send messages to new chats PR#28 (#52)
67784bc - feat: get current connection state
e385563 - Initialize the Script with the first browser tab (#47)
v1.0.2 - More stable connection
This introduces a slight change that adds the TIMEOUT state as an accepted state to be in. This means that the client won't completely disconnects as soon as the phone loses connection for a second.
A new event has also been added to the client, change_state, which is fired whenever the connection state changes. It passes the new connection state as its only parameter.
Raw changelog
d44fd5d - new event on connection state changed
a293146 - fix: added timeout to accepted states
v1.0.1 - Fix sending media
v1.0.0 - We're stable!
After a burst of work, nearly all essential features have been implemented into the library. This release brings lots of improvements, such as:
- Mention users and get mentioned users from messages
- Send messages with attachments (documents, images, audio..)
- Send messages with Location
- Get quoted message
- Get contacts
- Join groups by invite code
- Set your status message
Furthermore, improvements have been made to the general process of sending messages, such as:
- Returning the message you just sent
- Accepting an options object where you can specify messages you want to reply to, users to mention, media to attach and more in the future.
New documentation
The first steps to publishing documentation for the library have been taken, and you can find a very preliminary version of it at https://pedroslopez.me/whatsapp-web.js. It's pretty barebones and merely contains the models and functions available, but it means you won't have to go digging in the code to check what kind of stuff you can do.
The next goal here in terms of documentation is to work on a nice and clear guide that explains how the library works and how to use it, in plain english.
Breaking changes
There's only one breaking change in this release, which affects users that have used Message.downloadMedia(). Specifically, this function used to return an object where the data prop was a data url. Now this returns an instance of the MessageMedia class for compatibility with sending media. The structure is pretty much the same as the old object that was returned by downloadMedia(), but the data prop is now a base64 encoded representation of the media file.
Raw changelog
f947f75 - docs: add location to supported content types
d1dba0f - add disconnect reason
64ed2c1 - more message types
5616613 - feat: Mention users, get user number from Contact model
ef80f96 - fix: correctly get message contact in group chats
edc2c70 - feat: change status message
f2b286a - feat: get contact's profile picture
004312a - expose some more fields on contacts
2896aeb - fix some doc related stuff
065a921 - add another location example
7b229a3 - feat: Send and receive location
4b17684 - Get Mentions (#35)
0cbc24f - Update puppeteer to version 2.1.1 (#36)
a247b39 - docs(readme): add whatsapp web version tested
bf70eb1 - docs: regenerate docs
1ad9cac - docs: better readme
62e2642 - docs: add generated docs
2f0480c - docs: add more documentation
a098d61 - feat: send messages with attachments
e717915 - fix: don't get chat after accepting invite
e2351db - Added Contact Model (#34)
b597e4a - Added delete event message(#33)
b99744a - Create lint.yml
cc477f9 - Add eslint config and fix linting issues
8eb461e - Update puppeteer to v2.1.0
7243240 - fix !quoteinfo example
5b9413d - [FIX] Expose Wap module
8ddf4c2 - Add .editorconfig (close #25)
caa8598 - [+] Join groups by invite code
a6cc5e5 - [+] Get quoted message [FIX] Properly reply to messages sent by the current user
ba8edc8 - [+] Expose information about the logged in client (#19)
88c56b1 - Return new message after sending
2a3f404 - Merge pull request #32 from gabriel-tandil/master
d2889a8 - Improvement in KEEP_PHONE_CONNECTED_IMG_SELECTOR
v0.3.2 - Hotfix
This fix addresses an issue introduced by a change on WhatsApp Web's code that did not allow the client to properly start up.