* update WAWebSendReactionMsgAction call to use sendReactionToMsg method
The WhatsApp Web internal API changed the WAWebSendReactionMsgAction module
from a directly callable function to an object with a sendReactionToMsg method.
Before:
await (window.require('WAWebSendReactionMsgAction'))(msg, reaction);
After:
await (window.require('WAWebSendReactionMsgAction')).sendReactionToMsg(msg, reaction);
This fixes the TypeError: window.require(...) is not a function error
thrown when attempting to react to messages.
* Refactor react method for improved readability
* Update Message.js
Co-authored-by: @BenyFilho
* Update Message.js
Co-authored-by: @Benyfilho
* Update Message.js
Co-authored-by: @BenyFilho
* Update Message.js
Co-authored-by: BenyFilho <BenyFilho@users.noreply.github.com>
---------
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: BenyFilho <BenyFilho@users.noreply.github.com>
* 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
* 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
* fix: change mentionedIds type from ChatId[] to string[] in Message interface
* fix: correct types for mentionedIds and groupMentions
---------
Co-authored-by: alechkos <93551621+alechkos@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: 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
* 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 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