* 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>
* 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>
* Add exposeFunctionIfAbsent function
* use exposeFunctionIfAbsent function instead of original exposeFunction
* Remove "reinject" flag
* exposeFunctionIfAbsent - onQRChangedEvent
* exposeFunctionIfAbsent - onLogoutEvent
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>
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>
* 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>
* 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>
* 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>
* 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
* 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>
* 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
* 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>
* 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
* 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