Commit graph

857 commits

Author SHA1 Message Date
Shir Serlui
ac0a50082f
Fix link preview (#2681)
* Fix link preview

* Fix typo

* Fix preview options

* Add example for preview
2023-12-12 20:56:44 +02:00
WWebJS Bot
5001a89714 1.23.1-alpha.1 2023-12-12 08:36:07 +00:00
Humberto Zambrano
b5eb4f97ce
Fix Cannot read properties of undefined (reading 'mediaStage') in message.js (#2556)
* Update Message.js

Fix Cannot read properties of undefined (reading 'mediaStage') when msg or msg.mediaData is undefined.

* node 13 compatible

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-12-08 01:12:58 +02:00
tuyuribr
1e217640cf
Change Supported features (#2443)
* Change Supported features

* Update "P" to "p"

* style: fixed typo

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-12-05 15:01:58 +02:00
tofers
3dab4a3f41
fix: message_edit event and edit caption in file (#2617)
* edit caption

* Update Client.js

* refactor: events combined into one line

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-12-05 14:50:55 +02:00
Shir Serlui
4009bb792b
feat: Add Bussines Contact Types (#2369)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-12-01 21:15:06 +02:00
Shir Serlui
d81b74324d
fix: window.Store.getMsgInfo is not a function (#2651)
* Fix window.Store.getMsgInfo is not a function

* Unneccery code removed
2023-12-01 07:43:16 +02:00
alechkos
58fc39f97d
[BUG] fixed poll docs (#2652) 2023-11-26 23:00:30 +02:00
alechkos
7ff9c9807b
fix: Message.getInfo (#2574)
* module fixed + improved modules retrieving

* wait for msg data to be updated

* added random sleep value between 1100-1200 ms

* added check for msg is sent by current user

* node 13 compatible

* docs fixed

* msg.fromMe fixed

* timestamp calculation fixed

* window.injectToFunction clarifications
2023-11-24 12:18:18 +02:00
WWebJS Bot
7737a0d701 1.23.1-alpha.0 2023-10-22 11:08:32 +00:00
tofers
04175063ce
feat: control auto-loading of files + fixed method setDisplayName (#2295)
* fixing the setPushname function

* Adding functions that change the media autoloading

* Checking against raw data

* fixed

* fixed merge

* ESLint

* Update src/util/Injected.js

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-10-22 14:07:55 +03:00
Pedro S Lopez
104b05d36f chore: regen docs for v1.23.0 2023-10-21 11:39:02 -04:00
github-actions[bot]
4aff224b70
Update supported WhatsApp Web version to v2.2346.52 (#2413)
Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com>
2023-10-21 11:38:24 -04:00
Pedro S Lopez
d2127832c6 chore: mark version v1.23.0 2023-10-21 11:37:45 -04:00
WWebJS Bot
0bf32c5f0c 1.22.2-alpha.4 2023-10-19 16:39:23 +00:00
alechkos
67d305be78
feat: send polls (#2377)
* feat: added Poll class

* feat: logic for sending polls added

* updated poll properties on returned message instance

* docs updated

* usage example updated

* module fixed

* 'pollSendOptions' changed to 'options'

* window.compareWwebVersions fixed

* small update to improve the performance of findImpl fix

* added option for custom message secret

* usage example updated
2023-10-19 19:37:30 +03:00
alechkos
49feb3660c
fix: chat object creation within the event (#2506)
* fixed chat object creation

* window.compareWwebVersions fixed

* small update to improve the performance of findImpl fix
2023-10-18 17:22:32 +03:00
WWebJS Bot
f5555f6aa0 1.22.2-alpha.3 2023-10-11 14:55:34 +00:00
alechkos
670335f3f4
hotfix-findImpl (#2578) 2023-10-11 11:54:28 -03:00
WWebJS Bot
50cb91197d 1.22.2-alpha.2 2023-10-11 13:11:47 +00:00
alechkos
c0705a2216
fix+feat: addParticipants + createGroup (#2344)
* added required modules

* added sendGroupV4Invite implementation

* docs updated accordingly

* bug fixed

* added usage example

* ESLint fix

* extended resulting object

* docs updated accordingly

* added required modules

* updated comments

* bug fixed

* added usage example

* fixed to catch unexpected errors

* removed unnecessary module

* updated usage example

* minor fixes

* changed to return a string if an error is occupied

* fixed usage example

* removed unneccessary module

* added getAddParticipantsRpcResult

* updated addParticipants

- added AddParticipnatsOptions to provide values for sleep, autoSendInviteV4, comment
- combined addParticipants with sendGroupInviteMessage

* removed unneccessary sendGroupV4Invite

* docs updated

* fixed statement fot autoSendInviteV4

* minor fixes

- the returned value of addParticipants is no longer wrapped in an array
- docs updated
- fixed bug with the returned code value when the code is '200'

* added logic of retrieving the group profile picture

this allows to send an invitation with a profile picture thumbnail of the group

* minor fixes

* added fix for the inviteV4 to be sent

* updated usage example

* minor fix

* ESLint fix

* fix for code 419

* function name getProfilePictureThumb changed to be more clear

* refactor: modules moved to window.Store.GroupParticipants

* refactor: edited link of usage examples

* refactor: LidManipulations changed to LidUtils

* refactor: modules regrouping

To keep the modules in order were made some changes:
- JoinInviteV4 renamed to GroupInviteV4 and grouped with module sendGroupInviteMessage
- GroupParticipants grouped with module sendAddParticipantsRPC

* fix: injectToFunction fixed to work properly

* revert docs changes for Chat

* Merge branch 'main' into fix-add-participants

* docs fixed

* minor fix in injectToFunction

* removed data stringifying/parsing

* added random sleep time logic

* code refactoring

* docs updated

* addParticipants method refactored

* createGroup method extended

- added functionality to send private invitations automatically to missing participants
- added ability to provide value for message timer
- added ability to link a group to the community parent group at the stage of creating a group
- extended the returned data after the method call

* docs updated + typo fixed

* added ability to create group with myself only

* example updated

* docs clarified

* small code refactoring

* window.Store.Invite and window.Store.InviteInfo grouped

* window.compareWwebVersions fixed

* small update to improve the performance of findImpl fix

* gid as wid structure

* docs + example updated

* parenthesis

* avoid sleep after the last iteration

* fixed compatibility issue for sendGroupInviteMessage

* fixed issue with stale groupmetadata

in some cases after the participant has left the group, that participant is still stored in groupmetadata

* fixed compatibility issue for sendAddParticipantsRPC

* minor fix

* jsdocs fixed

* fixed issue with group creation

* fixed createGroup method

- added check for unregistered phone number
- extended returning data from method call: added title
- code refactored
- jsdocs fixed

* fixed addParticipants method

- added check for unregistered number
- code refactored

* docs fixed

* usage example fixed

* removed unnecessary method call

* jsdocs fixed

* check for group admin fixed
2023-10-11 16:10:26 +03:00
alechkos
56320c88f8
feat: group membership requests (#2516)
* added event for group membership request

* small update to improve the performance of findImpl fix

* window.compareWwebVersions fixed

* added getGroupMembershipRequests method

* added approveGroupMembershipRequest method

* correct module for getGroupMembershipRequests

* membershipRequestAction separated to Injected.js

* docs clarification for approveGroupMembershipRequest

* added rejectGroupMembershipRequest method

* module fixed

* methods extension

* docs clarification

* force to update group membership requests

* docs fixed

* added usage example

* avoid sleep after the last iteration

* fix: added missing modules

* improve forcing to update group membership requests

* usage example clarification

* module refactored

* optional parameters

* usage example modified

* remove default values for membershipRequestAction

* added error description for memb req action

* usage example fixed

* return result even if ServerStatusCodeError

* default error message was missing

* removed line break
2023-10-09 18:17:02 +03:00
alechkos
ecf19eb9a5
fix: sending locations (#2339)
* added function to to modify module functions

* fix for locations to be sent

* changes for class Location

- description property was splited into name and address
- added url property
- added ability to pass name, address and url as options while creating an instance

* docs updated

* usage example updated

* added url checking

* fixed url

* updated location property in Message class

* fixed url when http prefix is provided

* injectToFunction updated to be more flexible

* docs clarification

* ESLint fix

* fix: injectToFunction fixed to work properly

* minor fix in injectToFunction

* refactor: added usage of url validator

* small change to improve performance for findImpl fix

* window.compareWwebVersions fixed
2023-09-20 23:11:52 +03:00
WWebJS Bot
1c059d3b3d 1.22.2-alpha.1 2023-09-20 17:21:56 +00:00
Humberto Zambrano
152f0a64cd
Update Client.js in order to detect login in new WhatsAppWeb (#2474)
* Update Client.js

New WhatsAppWeb selector for login sucess

* change to search

---------

Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2023-09-14 17:02:40 +03:00
WWebJS Bot
b671b0c708 1.22.2-alpha.0 2023-08-25 14:00:51 +00:00
Felipe Martins
b3a2fe14b1
add clientId to tempDir (#2430)
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2023-08-25 16:47:48 +03:00
Ricardo Araújo Paes
20dad1b50f
Fix error in nodejs v12.x (#2389) 2023-08-24 14:18:40 -03:00
Vinicius Tavares
abac063b77
Fix for #2433 (#2434)
* Fix #2433

* make ESLint happy
2023-08-23 10:11:28 -03:00
alechkos
df1b070d54
feat: send audio with waveform (#2309)
* added generateWaveform

* docs updated

* added usage example

* ESLint fix

* fixed: undefined returned on waveform generation failure

* fix: ESLint
2023-08-10 13:37:45 +02:00
Pedro S Lopez
b47998878a chore: mark version v1.22.1 2023-08-10 00:53:39 -04:00
Pedro S Lopez
ea46317b7e fix npmignore 2023-08-10 00:53:25 -04:00
Pedro S Lopez
a1bbd25fd3 chore: mark version v1.22.0 2023-08-10 00:49:50 -04:00
github-actions[bot]
8bd2624866
Update supported WhatsApp Web version to v2.2333.11 (#2246)
Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com>
2023-08-10 00:37:03 -04:00
WWebJS Bot
b787eee218 2.0.0-alpha.0 2023-08-10 04:24:48 +00:00
alechkos
9b827541e6
fix for findImpl (#2390) 2023-08-10 07:24:06 +03:00
WWebJS Bot
9a6466edbc 1.21.1-alpha.1 2023-08-09 16:28:38 +00:00
alechkos
3be7566483
fix: CallCollection (#2385)
* fix: changed module for CallCollection

* code refactored

* compareWwebVersions fixed and moved to window.compareWwebVersions

* code refactoring
2023-08-09 19:27:24 +03:00
RendyCraft047
1ebcdee3b9
Update GroupChat.js (#2382)
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2023-08-08 18:24:22 +03:00
Roi Greenberg
096e84b0a9
fix fromMe in chat.fetchMessages (#2314)
* fix fromMe

* Fix Test

* fix crash in getchat

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2023-08-08 18:16:02 +03:00
Christophe
776c1b152e
Improve logout() LocalAuth logic (#2175)
* Improve logout() LocalAuth logic
- Wait for browser to close to prevent Exception on Windows

* Update Client.js

* Update LocalAuth.js

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2023-08-07 23:51:31 +03:00
WWebJS Bot
d272389246 1.21.1-alpha.0 2023-08-07 17:28:33 +00:00
Shir Serlui
b4d82d8425
Feat: get message by id (#1634)
* feat: get message by id

Add the feature of getting messages by id.
It's loads messages that are not loaded in the Store.Msg, and add them into the Store.Msg.
I don't use the draft because this is already work

* Fix typo

* Fix for test

* Update index.d.ts

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Codeboss <131376628+codebossdev@users.noreply.github.com>
2023-08-07 14:10:11 -03:00
Guilherme Mascarenhas
41e59efa72
fix: Client.getChatById(): Cannot read properties of undefined (reading '_serialized') (#2225)
* fix: Cannot read properties of undefined (reading '_serialized')

* Update supported WhatsApp Web version to v2.2321.6

* Revert "Update WhatsApp Web Version (2.2321.6)"

---------

Co-authored-by: guicuton <guicuton@users.noreply.github.com>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2023-08-07 18:57:23 +03:00
RendyCraft047
d959645bc3
fix: group invite v4 (#2321)
* Update Injected.js

* Update Client.js

* fix changes

* make it simple

* fix if undefined

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2023-08-07 06:37:56 +02:00
alechkos
dce964d934
fix: group_join event (#2320)
* added linked_group_join subtype

* typo fixed from pr#2027

* fix: ESLint
2023-08-06 09:30:59 +03:00
alechkos
8ff5bceca0
feat: send photo/video as a view once message (#2317)
* added isViewOnce property

* docs updated

* added usage example

* fix: ESLint
2023-07-31 12:53:35 +03:00
alechkos
c8c2f09f20
fix: Contact (#2325)
* fixed: contact info retrieving

* fixed: block method

* fixed: isBlocked property is now changeble

* added inner function to compare between WWeb versions

The function compares the currently used WWeb version with the version that requires the code changes. Its purpose is to ensure the stable operation of the library across different WWeb versions.

* added: todo remove useOldImplementation

* improved inner function to compare WWeb versions

* inner function: added support for beta versions

* added support for business accounts

* module queries changed to strings

* fixed check for wweb beta versions

* updated to throw a custom error message

* minor changes in inner function
2023-07-31 09:41:17 +03:00
tofers
8fc6e6098c
feat: add or remove labels (#1915)
* add or remove labels

* Strings use singlequote

* add event chat change labels

* Revert "add event chat change labels"
2023-06-25 16:25:49 -03:00
tofers
8e8d0c9b3e
feat: Edit message (#2254)
* function edit message
2023-06-15 12:49:38 -03:00