Commit graph

890 commits

Author SHA1 Message Date
alechkos
f7d0456a49
hotfix: fix window.WWebJS.getChatModel (#3573) 2025-06-01 23:37:21 -03:00
WWebJS Bot
2128f97729 chore(): generate docs 2025-05-31 18:37:38 +00:00
WWebJS Bot
477db5a7c9 1.29.0 2025-05-31 18:37:15 +00:00
alechkos
d0642b761c
feat: Channel (#2620)
* window.injectToFunction clarifications

* added createChannel method

* initial Channel class structure

* added getChannelById and getChannels methods

* added 4 methods to change channel metadata

* added deleteChannel method

* added subscribe to/unsubscribe from channel methods

* ecmaVersion updated to 2022

* added searchChannels method

* refactoring of: getChat, getChannel, getChatModel, getChannelModel

* removed Channel.canSend

* sendMessage updated to support channels [p1]

* createChannel: returns string if an error occupied

* added getSubscribers

* added mute/unmute methods

* searchChannels: minor update

* sendMessage updated to support channels [p2]

- added support to send image, sticker, gif and video

* [REFAC] refactored chat retrieving in getChatOrChannel

* [FEAT] added getChannelByInviteCode method

* [CHG] added check if channel creation enabled

* [FEAT] added sendChannelAdminInvitation method

* [WIP] preparations for sending polls [p1]

* [BUG] fixed some internal functions

* [BUG] fixed poll creation

* [COPY] renamed some internal functions

- window.WWebJS.getChatOrChannel renamed back to window.WWebJS.getChat
-window.WWebJS.getChatOrChannelModel renamed back to window.WWebJS.getChatModel

* fix: typo

* fix: send docs without caption

* fix: fixed some internal function

* fix: channel retrieving

* fix: fixed internal getChannelMetadata function

* fix: fixed channel admin can unsubscribe from channel

* feat: channel admin functionality

* feat: added fetchMessages method

Co-authored-by: tuke307 <58882912+tuke307@users.noreply.github.com>

* refactor: revert removing support for Buttons and Lists

Note: buttons and lists are deprecated

* refactor: revert parameter name from 'chatOrChannel' to 'chat'

* fix: support Node v12

* refactor: return 'undefined' in a case of falsy value

* refactor: use already created variable

* docs: fix 'countryCodes' property type

* fix: 'searchChannels' method fixed

* fix: add check in 'setReactionSetting' method

* sendNewsletterMessageJob requires a proper Msg Object in 2.24xx (#10)

Co-authored-by: Sven Neumann <s.neumann@websix.de>

* style: fix broken link in readme file

* fix: only directPath determines whether hasMedia or not

fixes #2952

* fix: get rid of unnecessary 'await'

* feat: add option to send polls in channels

* refactor: get channel instances with 'getChatById'

* chore: fix eslint

* fix: fatal error

* refactor: delete local models by default when unsubscribing

* fix: prevent TypeError if no channel models are returned

* fix: update 'searchChannels' function for WWeb > 2.3000.0

* fix: fix for 'getChannelByInviteCode' function

* fix: fix for 'sendChannelAdminInvite' function

* fix: update 'fetchMessages' for channels

* refactor: update 'setReactionSetting' function

* fix: update 'sendMessage' for channels

* feat: add 'transferChannelOwnership' function

* refactor: add 'deleteChannel' function to 'Client'

* style: fix project code style

* chore: eslint fix

* feat: add 'sendSeen' function

* fix: fix the function restoration after injection

* refactor: remove duplicate module

* fix: get isNewsletter properly

* fix: fix channels media - add mediaHandle

Co-authored-by: devlikepro <155617407+devlikepro@users.noreply.github.com>

---------

Co-authored-by: tuke307 <58882912+tuke307@users.noreply.github.com>
Co-authored-by: Sven <sven2neumann@gmail.com>
Co-authored-by: Sven Neumann <s.neumann@websix.de>
Co-authored-by: devlikepro <155617407+devlikepro@users.noreply.github.com>
2025-05-31 21:36:19 +03:00
alechkos
dd257b2039
feat: @­lid support (#3571)
* fix: convert lid to wid in window.WWebJS.getChatModel

* convert lid to wid in window.WWebJS.getContact
2025-05-31 21:24:44 +03:00
WWebJS Bot
f41d1e2174 chore(): generate docs 2025-05-30 17:29:26 +00:00
WWebJS Bot
5ad6a03b2c 1.28.1-alpha.0 2025-05-30 17:29:07 +00:00
alechkos
91217f87ba
fix: Chat.isMuted (#2999)
* fix: isMuted returns true or false

* docs: add missing parts

* refactor: apply simplification

* fix: update chat instance after calling mute/unmute

* stylee: clarify and fix docs

* fix: fix convertation of Date to timestamp

* refactor: small code refactor
2025-05-30 16:41:31 +03:00
alechkos
d29eaf7def
feat: save contact to addressbook (#3533)
* feat: add respectfull modules

* feat: add saveOrEditAddressbookContact function

* feat: add deleteAddressbookContact function

* refactor: import necessary type for return value

* style: fix typo

* docs: add ocs

* style: fix typo
2025-05-30 16:39:32 +03:00
Shir Serlui
494a18ddb2
Support lid me user in message id (#3570)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-05-30 16:38:48 +03:00
WavyCat
3836309f99
Fix the Location declaration (#3555)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-05-30 16:28:40 +03:00
Kang
e62f15edf3
Able to forward with caption (#3463)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2025-05-30 15:56:35 +03:00
alechkos
385e3cc59b
fix: chat instance retrieving in syncHistory (#3342) 2025-05-30 15:53:36 +03:00
alechkos
bad202d2bc
fix: fix 'delete' method for messages (#3301) 2025-05-30 15:51:41 +03:00
alechkos
0d040611e7
fix: remove serialization on already deserialized object (#3350) 2025-05-30 15:50:02 +03:00
Luiz Braga
c6b6fb149b
fix: puppeteer connection with browser url (#3518)
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-05-30 14:39:11 +03:00
alechkos
c67980d47d
fix: setDisplayName changes name only locally (#3302)
* fix: change internal function

* chore: eslint fix

* style: revert spca
2025-05-30 14:36:45 +03:00
alechkos
90b71cc6d3
fix: openChatWindowAt function (#3347)
* refactor: export the whole module, not a very single function

* fix: fix openChatWindowAt function
2025-05-30 14:32:53 +03:00
tofers
c0ba5e545b
feat: Setting background synchronization (#3331)
* Changing the background synchronization setting

* add  example

* return function

* style: add clarification note

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2025-05-30 11:06:08 +03:00
Gusfahmi Alghazali Caniago
cefc403791
fix: change resetState evaluate function (#3358)
Co-authored-by: gusfahmi <gus@entertrim.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2025-05-30 10:33:47 +03:00
BenyFilho
007ee59cea
Update Utils.js to fix chat.isReadOnly (#3515)
Fixing chat.isReadOnly attribute

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-05-30 10:20:43 +03:00
WWebJS Bot
c018e2dcbe chore(): generate docs 2025-05-12 15:01:06 +00:00
WWebJS Bot
f6f4790a48 1.28.0 2025-05-12 15:00:44 +00:00
BenyFilho
0ad998d68d
Fix groupChat addParticipants (#3543)
* Fix addParticipants

* fix Approve and Reject Membership Requests
2025-05-12 11:50:42 -03:00
tuyuribr
ad11b5bfee
Send message without quote if quoteFails (#3475)
* Send message without quote if quoteFails

New option to send a message without quote when quotedMessage fails

* Rest

* Changing to sendMessage level

* Update Utils.js

* Update Utils.js

* Update Utils.js

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-04-24 18:10:39 -03:00
alechkos
6d1655503f
fix: getCountryCode (#3292) 2025-03-27 09:58:51 +02:00
WWebJS Bot
d26d87507d chore(): generate docs 2025-03-27 07:51:22 +00:00
WWebJS Bot
6f5a34b7d0 1.27.0 2025-03-27 07:51:03 +00:00
BenyFilho
441a3a6d6c
Fix Group getInviteCode (#3492)
* Update Store.js add new require to fix getInviteCode method

* Update GroupChat.js adjusting method getInviteCode
2025-03-26 06:56:32 +02:00
devlikeapro
f56d25f1c4
Add max retries for fs.promises.rm (#3351) 2024-12-23 19:33:08 +02:00
WWebJS Bot
5df83b030d chore(): generate docs 2024-11-22 21:56:19 +00:00
WWebJS Bot
6f11c24762 1.26.1-alpha.3 2024-11-22 21:55:58 +00:00
BenyFilho
301c9af8b7
Fix isGroup (#3380)
* Update Utils.js getChatModel because Meta chat object affected Group Chats

* Ajust to set isGroup as false as default
2024-11-22 18:55:13 -03:00
WWebJS Bot
fc722dd1d3 chore(): generate docs 2024-10-04 04:29:49 +00:00
WWebJS Bot
4694e8337f 1.26.1-alpha.2 2024-10-04 04:29:29 +00:00
github-actions[bot]
058a799303
Update supported WhatsApp Web version to v2.3000.0 (#2616)
Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com>
2024-10-04 04:26:27 +00:00
alechkos
6887c4a886
fix: enable docs generation before the release (#3300)
The commit fixes an issue where the node_modules\/.bin\/jsdoc is not found
2024-10-04 00:22:19 -04:00
alechkos
17d63a53fb
fix: change the logic of wweb version retrieving (#3299)
* fix: change the logic of wweb version retrieving

* refactor: change the strategy of wweb version retrieving
2024-10-04 00:21:07 -04:00
alechkos
1e03ca6828
chore: update issue templates (#3298)
* chore: update issue template for more clarity

* chore: update feature request template for more clarity

* chore: update pr template for more clarity
2024-09-30 20:34:39 +03:00
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