Commit graph whatsapp-web.js/src/Client.js
Author SHA1 Message Date
RendyCraft047
2dc9466fac
refactor: auth store handling (#201667)
* update module store

* delete auth stores directory
2026-05-14 08:47:38 -03:00
Maksim Koryukov
211205363c
fix(deps): upgrade eslint and plugins to 9.39.4 (#201701)
* fix(deps): upgrade eslint and plugins to 10.2.0

* chore: manual lint-fix

* chore: automatic lint-fix

* feat(repo): github actions - lint - use node v24

because it is linting (not runtime), so why not
to use the latest stable Node version

* fix: remove @stylistic/eslint-plugin (in favor of prettier)

* fix: eslint uses `ecmaVersion` 2025

* fix: eslint's "mocha" config is isolated (for test files only)

for example `describe` is not considered "global" outside the
test files. the same for all other "eslint/mocha" rules -
they are applied only to files in `/tests` folder.

* chore: update package-lock.json after eslint upgrade
2026-04-18 17:50:05 -03:00
BenyFilho
33f88ac150
Fix: Event Call (#201714)
* Fix: Event Call

* Update Client.js
2026-04-16 13:14:53 -03:00
2^1
cbf49be9be
fix: resolve naming issues (#201712)
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
2026-04-16 12:45:35 -03:00
Maksim Koryukov
11594b2887
refactor(client): move sendReaction method to the Client (#201695)
`Message.react` moved to `Client.sendReaction`
2026-04-12 09:30:32 -03:00
Adi1231234
1a9a1b7022
fix: recover ciphertext messages via PLACEHOLDER_MESSAGE_RESEND (PDO type 4) (#182677)
* fix: recover ciphertext messages via PLACEHOLDER_MESSAGE_RESEND

Add automatic recovery for ciphertext messages using WhatsApp's built-in
PLACEHOLDER_MESSAGE_RESEND (PDO type 4). Override the AB test gate and
send recovery requests after a 5s grace period.

Also adds message_ciphertext_failed event at 15s and fixes incorrect
JSDoc on onAddMessageCiphertextEvent.

* fix: skip message event when ciphertext resolves to revoked

when a ciphertext message is revoked before it decrypts, WhatsApp's
internal revoke handler calls model.set({ type: 'revoked', ... }) on
the existing model in place. This triggers change:type on the ciphertext
model, which fired the deferred listener and emitted a spurious message
event with type === 'revoked'.

add an early return in the once('change:type') callback to skip
onaddmessageevent when the resolved type is revoked.

fixes wwebjs/whatsapp-web.js#201668

* fix: use handlePlaceholderMsgsSeen for ciphertext recovery

replace the manual sendPeerDataOperationRequest call with a direct call
to handlePlaceholderMsgsSeen. This adds subtype filtering (skips
bot_unavailable_fanout, hosted_unavailable_fanout,
view_once_unavailable_fanout), an age check (14 day limit via the
placeholder_message_resend_maximum_days_limit AB prop), and internal
deduplication so the same message doesn't get multiple PDO requests.

the true second argument is the 'is visible' flag the function expects.
since the gate override is already in place earlier in the evaluate
block, the function passes its own internal gate check and proceeds
normally.

suggested by @sofi-ans in review.

* fix: batch ciphertext PDO requests instead of sending per-message

handleplaceholdermsgsseen has built-in chunking (batches of 32 per PDO)
but calling it with [msg] per message from Msg.on('add') bypasses that.
collect ciphertext messages into a shared buffer and flush them in a
single call after the 5s grace period.

also guard the failTimer to skip if the message type already changed.

* fix: replace silent catch blocks with established patterns

address reviewer feedback - remove catch (_) { // comment } pattern:
- Gate override now uses injectToFunction (existing utility)
- PDO call uses direct require without silent error swallowing

* fix(types): add on() overload for message_ciphertext_failed event

* fix: skip unavailable fanout placeholders from ciphertext recovery

unavailable fanout placeholders (view_once, hosted, bot) are
unrecoverable - WhatsApp's handlePlaceholderMsgsSeen explicitly
skips them and won't resend via PDO. Without this check, the
15s failTimer fires message_ciphertext_failed as a false positive.
2026-04-01 11:15:54 -03:00
Adi1231234
3e810b6913
feat: add cancelPairingCode() and requestPairingCode() on QR clients (#22449)
* feat: add cancelPairingCode() and allow requestPairingCode()

- requestPairingCode() now exposes onCodeReceivedEvent if needed,
  so it works on clients initialized in QR mode
- Add cancelPairingCode() method to stop pairing and return to QR
- Update TypeScript definitions

* fix(auth): dynamic ADV key in getQR + structural cancelPairingCode

the getQR closure captured advSecretKey once during initialize(), but
requestpairingcode/cancelPairingCode changes the key in IndexedDB.
the stale closure key caused QR scans to fail with HMAC validation error.

fix: read key dynamically via WAWebUserPrefsMultiDevice.getADVSecretKey()
(synchronous in-memory cache) on every getQR call, matching how WhatsApp
web's internal QR component works.

cancelpairingcode now mirrors WhatsApp Web's resetLinkDeviceState:
refreshqr() restarts WebSocket for fresh refs, then
initializeqrlinking() generates a new key. QR emission happens
automatically via the existing change:ref listener.

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
2026-03-24 10:01:31 -03:00
Lindionez
9899f4027a
fix: joinGroupViaInvite (#127102)
* Fix correct module

* fix: joinGroupViaInvite not working
2026-03-16 10:53:57 -03:00
2^1
807efd502d
chore: cleanup, ci workflows and formatting (#127064)
* ci: setup workflows, dependabot, labeler and commit linting

* docs: update README, community files and issue templates

* chore: configure prettier, editorconfig and format codebase

* chore: restore changes lost during rebase

* docs: adjust url for new logo

* fix: align badges

* chore: resolve conflicts and re-add temp lint
2026-03-10 01:45:12 +02:00
Lindionez
d933a0881f
FIx getProfilePicUrl (#127092)
* Applying correction given on discord

* Update Client.js

* Update Client.js

* Update Client.js

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
2026-03-08 11:54:47 -03:00
Rajeh Taher
883d7e4eda
Store: remove all mentions of window.Store (#127077)
* Store: remove all mentions of window.Store

* Apply suggestion from @BenyFilho

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
2026-03-01 16:49:21 -03:00
BenyFilho
9e42f1e0c3
Fix: Frozen WhatsApp Start or Auth Timeout (#127048) 2026-02-18 09:03:01 +02:00
Rajeh Taher
9b1eb76b2b
general: tree-shaking pre-MD and old comet versions (#5675)
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2026-02-10 23:24:54 +00:00
BenyFilho
9ba93d60ec
Fix loading_screen event (#5808) 2026-02-06 21:45:26 -03:00
BenyFilho
9b53bebfd2
Fix PDF Caption (#5794) 2026-02-06 14:09:11 -03:00
Adrián Lizaga
48a9e1d80e
fix: disconnected event is not being fired (#5807) 2026-02-06 14:06:55 -03:00
A. Rifqi Yarzuq Arfani
e66d94efd9
Fix update channel module (#5791)
* Fix getChats (#5779)

* Fix: getChats -> getChatModel -> GroupMetadata and NewsletterMetadata

* Fix module change

* fix: change wrong update module of channel

* fix: correct reference to pupPage in deleteChannel method

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2026-02-03 22:36:16 +02:00
Adi1231234
d5fd776356
avoid hang by closing browser only if connected (#3847)
* avoid hang by closing browser only if connected

* fix: correct indentation in destroy() method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:58:41 -03:00
alessandrocampos224
6c3f10e1d2
fix: update call handling for recent WhatsApp Web changes (#5775)
* fix: update call handling for recent WhatsApp Web changes

Updated the call handling logic to accommodate the renaming of Store.Call to WAWebCallCollection in recent WhatsApp Web versions. This ensures that incoming calls are properly managed without breaking functionality.

* Update Client.js

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2026-01-29 22:58:08 -03:00
BenyFilho
303caf9ba2
Fix deleteAddressbookContact (#5672) 2026-01-30 01:51:38 +00:00
BenyFilho
84c45c9558
Fixing method saveOrEditAddressbookContact (#5673) 2026-01-29 22:50:45 -03:00
Pedro S Lopez
c13510e907 chore: fix jsdoc invalid types 2026-01-05 01:40:46 -04:00
BenyFilho
143662eae2
Fix Auth Timeout Error (#5666)
* Fix Auth Timeout Error

* fixing Auth Timeout Error
2025-12-15 10:41:15 +02:00
tuyuribr
0439d7f123
New compatibilities (#3973)
* New compatibilities

* Update Client.js

* 1

* Update Client.js

* 3

* Update Client.js

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-12-13 06:55:09 +02:00
RendyCraft047
6aa1bd85ab
feat: whatsapp stories implementation (#3994)
* support sending message from status broadcast

* add to index.d.ts

* add method to contact

* new modules

* Update Utils.js

* add for the examples

* add color assertion function

* finishing..

* added waveforms for audio messages and minor fixes

* fix eslint

* refactor

reorganize the store to include additional modules.

* adapt

* the last one.

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-12-13 06:34:55 +02:00
RendyCraft047
0c36613cc7
feat+fix: send vote messages & vote update event (#3913)
* add send vote function

* Update index.d.ts

* fix and add required modules

* fix poll update in group chat

* adjustments to improvements

* add example usages

* fix eslint

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-11-09 16:37:51 -03:00
BenyFilho
6876dd236b
Fix method saveOrEditAddressbookContact (#3923)
* Fix method saveOrEditAddressbookContact

* Update saveOrEditAddressbookContact return void

* Update saveOrEditAddressbookContact return void
2025-11-04 16:30:25 -03:00
BenyFilho
b3caffa796
Fix getCommonGroups (#3921) 2025-11-04 19:14:17 +00:00
BenyFilho
7c7851f4d4
feat: getPollVotes (#3807)
* Add required module

* Add getPollVotes function

* Add getPollVotes function

* Add getPollVotes function

* Add Message.getPollVotes

* Add Message.getPollVotes
2025-10-07 19:24:05 +00:00
RendyCraft047
9b3d987711
fix: getPinnedMessages() (#3797)
* fix duplicate store

* fix: handle async calls properly

* fix: filter out only pinned messages

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
2025-10-07 22:11:37 +03:00
alechkos
7304ec2135
feat: get/add/edit customer notes (#3806)
* feat: add required module

* feat: add 'addOrEditCustomerNote' function

* feat: add 'getCustomerNote' function

* fix: check for logic availability

* feat: add 'Chat.addOrEditCustomerNote'

* feat: add Chat.getCustomerNote
2025-09-27 11:35:22 -03:00
alechkos
d077716315
fix: enforce retrieval lid and phone for previously unknown contacts (#3702)
* fix: check existance if undefined

* fix: handle missing lid/phone in group participant resolution

* refactor: remove duplicated logic
2025-09-06 18:24:19 +03:00
BenyFilho
4ac22c8c37
fix Event Ready Again and SendMessage (#3747)
* fix Event Ready Again

* Fixing SendMessage

* Fixing RejectCall
2025-09-02 03:56:56 +03:00
BenyFilho
6d496560b2
Fix Method window.Store.User.getMaybeMeUser() (#3727) 2025-08-30 19:11:34 +03:00
Fernando Mondo
912b78d299
fix: Add protocolMessageKey and fix revoked messages to preserve original before.id (#3715)
* Add protocolMessageKey and fix revoke

* Add protocolMessageKey and fix revoke

* docs: add explanation
2025-08-28 17:39:22 +03:00
alechkos
2ac982ee1c
fix: return poll vote reactions (#3694)
* wip: return poll vote reactions

* wip: add module

* wip: return poll vote reactions

* wip: return poll vote reactions

* Update Client.js

* Update PollVote.js

* wip: use async getMessagesById

* Update Client.js

* style: clean shit

* style: reformat code

---------

Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
2025-08-28 11:32:37 +03:00
alechkos
bd677a8a66
fix: send message properly (#3692)
* fix: remove high cpu consumption by adding waiting for message logic

 Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>

* refactor: use already defined msg id

* refactor: use optional arg for waiting for msg ack
2025-08-12 07:33:02 +03:00
Mob Code 100
b5adf47664
feat: Switch between QR or phone number pairing method (#3180)
* 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

* Switch pairing method between QR and phone number

* Remove existing pairing code interval

* Modify example.js

* Update docs

* Small improvements in inject function

* Fix ESLint

* example.js correction

* docs: fix docs for 'requestPairingCode' method

Co-authored-by: Leandro Matilla <30844484+wis-dev@users.noreply.github.com>

* Update Utils.js getChatModel because Meta chat object affected Group Chats

* Ajust to set isGroup as false as default

* Remove the need for custom interval

* Fix typo

* Fix intermittent response bug #9864

Co-authored-by: Mob Code 100 <66469454+MobCode100@users.noreply.github.com>

* fix: eslint fix

* Revert "Remove the need for custom interval"

This reverts commit c5d5e5626684742cadbf58f28739c1c2c9dcc582.

* Add wait for PairingCodeLinkUtils on requestPairingCode

* Remove unused vars WhatsWebStaticURL

Co-authored-by: Mob Code 100 <66469454+MobCode100@users.noreply.github.com>

* style: format code

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
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>
Co-authored-by: Leandro Matilla <30844484+wis-dev@users.noreply.github.com>
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
2025-08-09 00:37:25 +03:00
alechkos
f9db14d185
feat: Event messages (#3345)
* feat: add createCallLink function

* feat: create Event class

* feat: add functionality for sending Events

* feat: add editEvent function

* refactor: send event location prop as wa does

* refactor: combine modules

* feat: add sendResponseToEvent function

* fix: createEventCallLink parameter

* docs: add documentation

* fix: eslint

* refactor: change timestamp to Date for the user's convenience

* refactor: rename 'Event' to 'ScheduledEvent' for more clarity

* style: fix typo in inner function

* refactor: remove unnecessary inner function

* refactor: rename 'sendResponseToEvent' to 'sendResponseToScheduledEvent' for more clarity

* fix: update the module name
2025-08-09 00:36:27 +03:00
alechkos
18b1d32825
feat: get pinned messages (#3004)
* feat: add getPinnedMessage method

* docs: add docs for the method

* chore: fix eslint

* refactor: change logic of getting pinned messages

* refactor: combine all PinnedMsgUtils

* chore: remove comments and mark as ready for review

* style: fix typo

Co-authored-by: crazynds <36674096+crazynds@users.noreply.github.com>

---------

Co-authored-by: crazynds <36674096+crazynds@users.noreply.github.com>
2025-08-09 00:34:52 +03:00
alechkos
ca30ac4b18
feat: customise linked device name (#3325)
* feat: add functionality for setting device and browser names

* feat: add usage example

* feat: add usage example

* docs: add docs for new functionality

* docs: add missing property

* docs: supplement the implementation documentation
2025-08-06 15:50:42 +03:00
BenyFilho
81fd090e36
fix: Client.createGroup + GroupChat.addParticipants (#3670)
* Adjustment addParticipants

* createGroup fully refactored, fixed bugs, added creation options and updated docs

* fix: eslint fix

* refactor: GroupChat.addParticipants fully refactored

* fix: eslint fix

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-08-01 06:43:45 +03:00
BenyFilho
81fb154a9f
feat: getContactLidAndPhone (#3673)
* Add method getContactLidOrPhone

* Add method getContactLidOrPhone

* Add method getContactLidOrPhone

* Add method getContactLidOrPhone

* Add method getContactLidOrPhone

* Add method getContactLidOrPhone

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

* Add method getContactLidOrPhone

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

* Add method getContactLidOrPhone

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

* Add method getContactLidOrPhone

* Delete docs/index.html

* Delete docs/Client.html

* Create Client.html

* Create index.html

* Update to return the object

* Update to return an object

* Update Client.js to return both objects lid and phone

* Update Client.js to return both objects lid and phone

* Update src/Client.js

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

* Update src/Client.js

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

* Update index.d.ts

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

* refactor: rename function name for more clarity

* Change accept and return Array

* Change accept and return Array

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-07-29 17:39:39 +03:00
tofers
0ffb66fdb1
feat: send Media HD (#3535)
* Changing the quality of media downloads

* return function result

* add option sendImageAsHd

* change example

* fix quotes

* chore: remove unused code

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
2025-06-02 22:19:22 +03:00
alechkos
f7d0456a49
hotfix: fix window.WWebJS.getChatModel (#3573) 2025-06-01 23:37:21 -03: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
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
alechkos
385e3cc59b
fix: chat instance retrieving in syncHistory (#3342) 2025-05-30 15:53:36 +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