Commit graph

879 commits

Author SHA1 Message Date
Thomas
41b280c769
Expose chat pinned property (#2771)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-05-01 07:57:19 +03:00
WWebJS Bot
b85609381e 1.23.1-alpha.6 2024-04-30 19:30:14 +00:00
alechkos
01714fe599
feat: vote_update event (#2596)
* Merge branch 'add-polls' into polls-ext

* added listener to poll votes

* added isUnvote property

* added option for custom message secret

* usage example updated

* added logic for catching removed votes

* usage example updated

* fixed logic for poll vote events

* temp usage example

* No more `isCurrentState`

* messageSecret converted to array

Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>

* docs updated

* we already have messageSecret in vote.parentMessage

* PollVote.selectedOptions changed to be similar to pollOptions

* docs fixed

* window.injectToFunction clarifications

* minor clarifications

* fix: typo

* style: fix broken link in readme file

---------

Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2024-04-30 20:23:17 +03:00
Shir Serlui
8c810a8462
Fix: delete lines that remove data from this._data (#2958) 2024-04-29 10:59:20 +03:00
Gulg
b99d28c5c6
Add members settings (#2788)
* Update GroupChat.js

* Update index.d.ts

* style: clarify method doc

* refactor: add additional check

* fix: provide valid error name

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-04-28 16:22:07 +03:00
Bauguelson
aa26876a4b
Update Client.js (#2813)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-04-28 15:10:54 +03:00
dark
5b301bbd47
fix: logo link (#2994)
* fix: logo link

* fix: fix broken link in readme file

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-04-27 20:38:14 +03:00
dark
6d4ec618e4
style: guide link fix and detailed description (#2972)
* style: guide link fix and detailed description

Due to updates in the guide, the link broke. I also added a banner to make it look similar to the guide's readme. Additionally, changed link inclusion and revised text for better clarity, aligning it with the descriptive style used in the guide's descriptions.

* fix: change to current wweb version in the lib

* style: bring minor changes

* text background-color

* fix banner

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-04-22 14:24:08 +02:00
tuyuribr
79f0563ae2
Upgrade node version (#2129)
* Upgade node version

* Update package.json

* Node v18

* Update README.md

* Prevent unverified lib upgrade

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-04-03 04:06:32 +03:00
WWebJS Bot
72a18816a9 1.23.1-alpha.5 2024-03-01 14:11:59 +00:00
Rajeh Taher
a339199610
Fix isOfficialClient (#2794)
* fix(isOfficialClient): initial commit

* fix(isOfficial): eslint my dear

* chore: eslint my dear x2

* fix(isOfficial): make code more transparent

* fix(isOfficial): missing await

* fix(isOfficial): Obfuscate set to custom seed so maintainers can verify

* feat(isOfficial): original code

* chore: eslint
2024-03-01 16:05:09 +02:00
Pierre CORSINI
ef2f725bce
Fix TS compilation error "Statements are not allowed in ambient contexts" by removing semicolons. (#2697)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-01-18 07:50:00 +02:00
WWebJS Bot
1c26913c3a 1.23.1-alpha.4 2024-01-14 06:48:58 +00:00
alechkos
bd7cf9b463
fix: link retrieval from message (#2716)
* fix: fix links retrieving from message

* docs: fix Message.links property type

* refactor: revert bracking changes
2024-01-14 08:45:33 +02:00
alechkos
e0d955f130
feat: group mentions + improved user mentions (#2602)
* added logic to mention groups + fixed user mentions

* usage example updated

* docs fixed

* window.injectToFunction clarifications

* usage example clarifications

* fix: typo

* docs: added missed docs
2024-01-11 10:33:10 +02:00
alechkos
8d683a668b
feat: pin/unpin messages (#2692)
* feat: add Message.pin and Message.unpin methods

* feat: added usage example

* docs: clarifications
2024-01-11 10:24:02 +02:00
Shir Serlui
2100853727
Fix: Wrong import of Contact object (#2715)
* Fix: Wrong import of Contact object

There was an error in the import:
`const {Contact} = require('./Contact');`
instead of
`const Contact = require('./Contact');`

* style: fix import order

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-01-11 02:23:42 +02:00
WWebJS Bot
7851ad5bd2 1.23.1-alpha.3 2024-01-02 18:47:21 +00:00
tuyuribr
1e9b82b201
Reduce supply chain attacks vectors (#2691)
* Reduce supply chain attacks vectors

For some smallers dependencies we should hardcode specific versions to make it harder to make a supply chain attack

* Update package.json
2023-12-17 07:53:59 +00:00
WWebJS Bot
84f550ae0e 1.23.1-alpha.2 2023-12-17 07:52:19 +00:00
tofers
1dd35be834
feat: event message_ciphertext (#2292)
* add option cipherMsg

* add event  message_ciphertext

* example

* remove option cipherMsg

* removing unlinked code

* Update Client.js

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2023-12-16 17:10:26 +01:00
alechkos
981fa822a0
fix: send docs without caption (#2660)
* fix: allow to send docs without a caption

* fix: typo

* fix: async function proper handling
2023-12-12 18:36:44 -03:00
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