Commit graph

901 commits

Author SHA1 Message Date
tofers
5b0e139ad4
Get Stories (#3294)
* Get all broadcast

* fixed return msgs

* feat: add usage example

* Update src/structures/Broadcast.js

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

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-30 20:33:31 +03:00
alechkos
289b354285
fix: pass client reference correctly (#3296) 2024-09-30 20:31:46 +03:00
WWebJS Bot
6e5325867d 1.26.1-alpha.1 2024-09-26 03:50:39 +00:00
Lavyk Soares Nunes
4aef1ffea1
fix: openChatWindow (#3293)
* correção função openChatWindow

Alterando o "chat" para "chatId"

* fix: use defined variable

The bug found here: https://github.com/pedroslopez/whatsapp-web.js/pull/3291#discussion_r1776061417

Co-authored-by: StiflerPasha <40593009+StiflerPasha@users.noreply.github.com>

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: StiflerPasha <40593009+StiflerPasha@users.noreply.github.com>
2024-09-26 00:35:32 -03:00
WWebJS Bot
bf4aed232d 1.26.1-alpha.0 2024-09-25 20:58:43 +00:00
alechkos
b4c576123a
fix: hotfix the 'openChatWindow' function (#3291)
Co-authored-by: Beny Filho <168232825+BenyFilho@users.noreply.github.com>
2024-09-25 14:33:04 -03:00
devlikeapro
e470c82237
Use idempotent exposeFunctionIfAbsent (no reinject flag) (#3233)
* Add exposeFunctionIfAbsent function

* use exposeFunctionIfAbsent function instead of original exposeFunction

* Remove "reinject" flag

* exposeFunctionIfAbsent - onQRChangedEvent

* exposeFunctionIfAbsent - onLogoutEvent
2024-09-25 18:31:35 +03:00
Bernardo Peña
796a0a2367
Update Client.js (#3286)
fix: resolved issue with 'onPollVoteEvent' binding after logout

- Fixed error: 'Failed to add page binding with name onPollVoteEvent: window["onPollVoteEvent"] already exists!'
- The error occurred after logging out and attempting to reconnect.
- Connection would get stuck in 'authenticated' state and never reach 'ready'.

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-23 17:14:41 +03:00
alechkos
5b0e0612de
fix: make function getContactDeviceCount work (#3284)
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2024-09-23 17:12:17 +03:00
Kang
0fa6ebb66d
Sync history conversation of the Chat (#3281)
* Sync historical message

* Add documentation

* Code simplify

* feat: add syncHistory method in Chat class

* docs: update docs

* chore: update examples

* fix: handle asynchronous function properly

* refactor: include await

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-20 11:29:08 +03:00
WWebJS Bot
e7265a34b9 1.26.0 2024-09-18 20:52:50 +00:00
alechkos
01c45047d2
docs: generate docs for the latest release (#3279)
* docs: generate docs for the latest release

* docs: mark version v1.26.0

* docs: mark WWeb version v2.3000.1016590837
2024-09-18 23:51:12 +03:00
tuyuribr
d2597bba72
Count user connected devices (#3223)
* Update Store.js

* All

* Make Eslist god happy

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2024-09-18 10:33:23 +03:00
Alwin Lubbers
8fdf2b840e
fix: getMessageById false error with group chat message id (#3265)
Messages from Group Chats will have 4 elements in the `params` variable, instead of the 3 for private messages. That's because the `params` variable splits the string by `_`. Group chat messages will have 3 `_` characters instead of 2 for private chat messages.

This updates the check to account for group chat messages (which have 4 parameters instead of 3).

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2024-09-15 13:09:15 +03:00
Matheus Kuster
1591350144
chore: add typecheck to data.from and data.to when creating the inviteV4 (#3257)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-15 12:30:21 +03:00
Shir Serlui
f203523b75
Allow access to the original error object (#3252)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-15 01:46:09 +03:00
Alwin Lubbers
951ff7bfca
fix: sendMessage with quoted message id (#3260)
* fix: sendMessage with quoted message id

Now using `window.Store.Msg.getMessagesById` instead of `window.Store.Msg.get`

* refactor: apply message retrievement to all appropriate places

* chore: ignore ide's dirs

* fix: set proper variable

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-09-15 01:44:07 +03:00
Ayush Mourya
22af9df3d0
Handling client.logout() Exception gracefully with optional chaining (#2447)
* Added Optional Chaining to Avoid Breaking The Code

* Added Optional Chaining to Avoid Breaking Code

* Updated code to handle all node version

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2024-09-14 20:43:21 +03:00
WWebJS Bot
066d8fa75e 1.25.0 2024-07-24 01:36:56 +00:00
Rajeh Taher
13ce571c64
Farewell, Webpack! Re-injection, Pairing Code login, and 2.24x jumbofix (#2816)
* fix(webpack-exodus): Added the new patch

* fix(webpack-exodus): Fixed v2.3000.x and v2.24

* chore(webpack-exodus): eslint

* fix(webpack-exodus): Fixed Store

* fix(webpack-exodus): slight store fix

* chore(webpack-exodus): fix example so that I don't crash on every load

* chore: eslint fix

* fix(webpack-exodus): prevent confusion with build systems

* fix(webpack-exodus): Add proper groups module

* fix(webpack-exodus): Fix order queries

* fix(webpack-exodus): Bad export name

* feat(webpack-exodus): Re-injection, No more selectors, Pairing Code auth

* fix(webpack-exodus): Eslint and better login/logout handling

* fix(webpack-exodus): 2.24 compatibility

* revert testing options

* chore(webpack-exodus): ESLint

* chore(webpack-exodus): final eslint tweak (did not commit with last commit for some reason)

* style: fix broken link in readme file

* fix(webpack-exodus): Fix forwarding messages

* fix(webpack-exodus): finish forwarding function

* Making the ESLint god happy

* Fix window.Store.ProfilePic.profilePicFind is not a function error (#3001)

* Change window.Store.ProfilePic.profilePicFind to window.Store.ProfilePic.requestProfilePicFromServer

* Prevent breaking v2.2x

* refactor: make it more readable

---------

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

* Sanitize, improves and fixes

* make ESList god happy

* fix getInviteCode for group (#3007) (#3029)

* fix getInviteCode for group (#3007)

* move changes to proper getInviteCode method.

* style fix

* refactor: add try-catch in a case the user is not a group admin

* refactor: handle promise properly

---------

Co-authored-by: Sven Neumann <s.neumann@websix.de>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>

* fixes

* Update LocalWebCache.js

* fix delete on 2.3000 (#3048)

* fix delete on 2.3000

* fix compareWwebVersions

* fix: use proper comparison operator

---------

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

* Implement bot invoking capabilities (#3009)

* Implement bot invoking capabilities

* Update index.d.ts

* Eslint

* Webpack exodus fix message_reaction event (#3099)

* exposed WAWebAddonReactionTableMode

* capture reaction using WAWebAddonReactionTableMode

* move compareWwebVersions and check version before trying to expose new store

* message_reaction on example.js (#3102)

* handle message_reaction event on example.js

* log wweb version on ready

* fix reactions on pvt chats (#3104)

* New group function

* new group settings

* Update Client.js

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
Co-authored-by: Seow Zhen Jun <56989187+seowzhenjun0126@users.noreply.github.com>
Co-authored-by: Sven <sven2neumann@gmail.com>
Co-authored-by: Sven Neumann <s.neumann@websix.de>
Co-authored-by: Jorge Rocha Gualtieri <jorge@jrg.com.br>
Co-authored-by: Mateus Mercer <accounts@matbm.net>
2024-07-23 22:19:22 -03:00
WWebJS Bot
24b11b7d3f 1.24.0 2024-06-09 16:52:34 +00:00
Rajeh Taher
9847ebadb9
Make an NPM release via GitHub (#2942)
* Update release.yml

* Update publish

* Update release.yml

* Update publish

* Update publish: publish new docs before new version release

* Update publish

* Update publish

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2024-06-05 00:38:10 +03:00
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