Skip to content

Releases: pedroslopez/whatsapp-web.js

v1.4.1 - Fix sending media

11 Apr 19:03
Compare
Choose a tag to compare

A change occurred in WhatsApp Web that broke sending media functionality. This patch fixes this issue.

Changelog

97e488b - chore: update supported WhatsApp Web version to 2.2013.7
8e011e0 - feat: get current whatsapp web version
470c7ae - feat: added MediaKey in order to see which sticker has been sent (#146)
f92f1ec - Fix uploadMedia arguments after origin code change (#153)
702a0ab - Update jsdoc to version 3.6.4 (#144)

v1.4.0 - Create groups, listen for battery changes

06 Apr 03:43
Compare
Choose a tag to compare

Highlights

  • Create groups with the new client.createGroup() function
  • "change_battery" event will allow you to listen for whenever the battery changes
  • Group events (join, leave, etc) were not working. This release fixes the issue.

Raw changelog

93a6173 - feat: battery percentage changed event (#126)
1780436 - fix: make pupBrowser and pupPage available sooner (#137)
7acbd3d - fix: properly set chatId
67435b2 - fix: group events were not being triggered
743ac93 - feat: allow setting timeouts via options
0a7412c - feat: create groups

v1.3.1

02 Apr 06:35
Compare
Choose a tag to compare

Changelog

6c43a2d - fix: increase timeouts
001c045 - fix: only return undefined for ERROR_* media states

v1.3.0

30 Mar 03:57
Compare
Choose a tag to compare

This release includes a couple minor improvements:

  • new utility function on Client that can be used to check if a certain ID is a valid whatsapp user client.isRegisteredUser("[email protected]") will return a promise that resolves to a boolean
  • new event media_uploaded to get when media has been successfully uploaded for a message
  • new option restartOnAuthFail that will automatically restart if an authentication failure has occurred when trying to sign in with a preexisting session

Raw changelog

9d0b58a - chore: mark version v1.3.0
842c4f0 - feat: check if ID is a valid whatsapp user
2dddc78 - fix: initialize takes no params
d8cd2d1 - chore: updated whatsapp web version
80d5783 - feat: new event for when media is uploaded
cb54487 - feat: add ack to message model
d08b343 - Added "restartOnAuthFail" as an option (#112)
ec1a80d - chore: bump version to v1.2.5-post

v1.2.5 - Fix for error thrown when trying to download nonexistent media

15 Mar 19:36
Compare
Choose a tag to compare

When attempting to download media file that has been deleted and cannot be downloaded anymore, undefined is now returned from message.downloadMedia().

25b9637 - fix: properly handle unresolved media
5934ec5 - fix: return undefined when attempting to download nonexistent media
65542f6 - chore/fix: update requires for new moduleraid package
00c603e - chore: use published moduleraid

v1.2.4 - Fix for downloading old media messages

14 Mar 21:45
Compare
Choose a tag to compare

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

13 Mar 21:52
Compare
Choose a tag to compare

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

13 Mar 04:17
Compare
Choose a tag to compare

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

06 Mar 01:22
Compare
Choose a tag to compare

This fixes an issue that was causing gaps while fetching a chat's old messages.

Raw changelog

c61f447 - chore: mark version v1.2.1
49aacec - fix: correctly splice and merge fetched messages
d7a3e1a - chore: update supported whatsapp web version
e14b49c - chore: bump version to v1.2.0-post

v1.2.0 - Fetch chat messages, group events, state updates

01 Mar 19:13
Compare
Choose a tag to compare

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 add or invite.
  • group_leave: emitted when type is either remove or leave.
  • 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