* added event for group membership request
* small update to improve the performance of findImpl fix
* window.compareWwebVersions fixed
* added getGroupMembershipRequests method
* added approveGroupMembershipRequest method
* correct module for getGroupMembershipRequests
* membershipRequestAction separated to Injected.js
* docs clarification for approveGroupMembershipRequest
* added rejectGroupMembershipRequest method
* module fixed
* methods extension
* docs clarification
* force to update group membership requests
* docs fixed
* added usage example
* avoid sleep after the last iteration
* fix: added missing modules
* improve forcing to update group membership requests
* usage example clarification
* module refactored
* optional parameters
* usage example modified
* remove default values for membershipRequestAction
* added error description for memb req action
* usage example fixed
* return result even if ServerStatusCodeError
* default error message was missing
* removed line break
* 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
* feat: get message by id
Add the feature of getting messages by id.
It's loads messages that are not loaded in the Store.Msg, and add them into the Store.Msg.
I don't use the draft because this is already work
* Fix typo
* Fix for test
* Update index.d.ts
---------
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Codeboss <131376628+codebossdev@users.noreply.github.com>
* feat: use specific whatsapp web version
* add constants to version updater
* configurable caches
* rename
* typings
* rm extraneous export
* missing from the rename
* rm version resolver
* match readme version
* use try-catch
* only persist if cache miss
* Initial commit
* Update index.d.ts
* The functions was returning a 'brief' chat data. With this, it will return full Chat model..
* Eslint suggested fixex
---------
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
* index.js
* [authReady] - new BaseAuthStrategy function
* [RemoteAuth] - new Class RemoteAuth added
* Eslint Fixes
* Eslint Fixes
* Added types for RemoteAuth (mostly assumed types from PR message and src/authStrategies/RemoteAuth.js)
* [dependency updates] - added unzipper & archiver
* [Types] - Fixing typescript declarations
* Renaming Base Class Hook
* auth hook rename on client
* [Error Handling] - Delegate responsability to end users
* [Refactor] - deletemetadata code refactor
* [Refactor] - backupSyncIntervalMs renamed
* [Refactor] - Minor improvement on deleteMetadata
* [Refactor] - backupSyncIntervalMs rename on index.d.ts
* [Update] - Fix for Ubuntu crahsing on extractSession
* [Update] - Delegate responsability to stores of making sure the previous session is deleted strictly only after the new one is saved
* [Update] - Improve file paths handling & naming (reduce assumptions between RemoteAuth and stores)
* [Update] - Adding new event <REMOTE_SESSION_SAVED> on Constants.js
* [Update] - Adding new authHooks <destroy> & <disconnect>
* [Update] - Adding <destroy> & <disconnect> hooks on Client.js
* [Update] - Adding new features to index.d.ts
* [RemoteAuth] - New Features added to RemoteAuth Class
* [dependency updates] - added fs-extra
* [Cross Platform] - Windows is now compatible with RemoteAuth
* [optionalDependencies] - moved archiver, fs-extra & unzipper to optional dependencies on package.json
* [optionalDependencies] - adding validation for when optional dependencies are missing
* [Update] - Node Deprecation warining for rmdir changed for rm instead
Co-authored-by: h110m <nichtwitzig228@gmail.com>
Without explicit delaration of void <T> for Promise running tsc causing the error:
```
node_modules/whatsapp-web.js/index.d.ts:707:38 - error TS2314: Generic type 'Promise<T>' requires 1 type argument(s).
```
* auth strategies
* default to no auth
* rename base auth strategy
* rename base strategy cont.
* refactor auth strategy methods and LocalAuth
* activate old session options even if is falsy value
* move restartOnAuthFail to LegacyAuthStrategy option
* add link to guide item
* update example/shell
* types
* fix: dont cause redirect loop due to session restore
* back to `state` in docs
* use referer to determine first injection
* bring bzck disconnect on nav
* revert some changes
* Update Message.js
Add isGif to the message data
* add typings
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Pedro Lopez <pedroslopez@me.com>
* max qr refresh before giving up
* Update src/Client.js
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>