Commit Graph

79 Commits

Author SHA1 Message Date
Adhiraj Singh 8d7fde1bf4 feat: add delay between retry requests 2022-03-23 12:40:01 +05:30
Adhiraj Singh 9fee7faaf6 feat: add message events for reactions 2022-03-23 00:40:46 +05:30
Ami 3a52f06c0f Added ReactionMessage for React User Message with Emoji (#1382)
* Add react type

* Add ReactionMessage

* Add reactionMessage example...

* Lint fix...
2022-03-23 00:35:13 +05:30
Adhiraj Singh 93c8db319e feat: implement "treatCiphertextMessagesAsReal" flag 2022-03-21 14:15:22 +05:30
Adhiraj Singh 238cde23b7 feat: automatic upload detection for product images 2022-03-07 15:33:52 +05:30
Adhiraj Singh c4edcef5da feat: implement fetching product catalog + order details on MD 2022-03-06 13:30:11 +05:30
Adhiraj Singh 8a52eeb310 feat: implement getOrder on legacy 2022-03-06 10:56:29 +05:30
Adhiraj Singh de7d1002a9 lint: stricter linting rules 2022-03-01 16:32:14 +05:30
Adhiraj Singh d21a39c302 feat: add product API for legacy connections 2022-02-24 17:58:37 +05:30
Adhiraj Singh 92587bd46a refactor: use the proto UserReceipt instead of custom MessageInfo 2022-01-22 00:27:00 +05:30
Adhiraj Singh 8f11f0be76 chore: add linting 2022-01-19 15:54:02 +05:30
Adhiraj Singh 7bb6e3ceeb refactor: chats.set event 2022-01-16 13:02:38 +05:30
Adhiraj Singh 09553def8a fix: include isLatest in events 2022-01-16 12:54:08 +05:30
Adhiraj Singh 793b23cb21 refactor: history processing
1. fixes issue when some chats/messages are not synced
2. adds info about whether the history chunk is the latest
2022-01-16 12:51:08 +05:30
Adhiraj Singh ede40b16f1 fix: update MD mismatch error code
Because 403 can mean other things as well -- don't want to conflate the two
2022-01-11 11:00:19 +05:30
Adhiraj Singh d15bde5d17 refactor: app state handling
1. fixes snapshot patches not being included
2. fixes all mutations being passed when syncing from scratch
3. simpler chat mutation model
4. do not retry if key is not found
2022-01-07 14:29:52 +05:30
BochilGaming 0b5d772b08 Fix ContactsArrayMessage and add getBusinessProfile (#1074)
* Fix: ContactsArrayMessage and add getBusinessProfile

* delete package-lock.json

* edit readme.md

* add bussines hours

* make type same with leagcy

* revert
2022-01-06 22:15:52 +05:30
Adhiraj Singh 9c0a3b8962 feat: add option to specify limit for custom upload host 2022-01-03 12:40:55 +05:30
Pokoke 3ad02f0317 fix listMessage (#1070)
* fix listMessage

* Default listType

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>

* use the ListMessageListType enum

* use the ListMessageListType enum

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2021-12-31 15:45:35 +05:30
Adhiraj Singh 5ae0b98636 feat: add replace type for messages.upsert 2021-12-23 10:54:17 +05:30
burstfreeze 98af4a6624 Fix #1010 by asking for full list of sync states when needed (#1043)
* Process patches that are longer.

* Fixed type declaration

* Changed resync behavior from recusive to iterative

* refactor: cleaner handling of hasMorePatches

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-12-22 20:57:58 +05:30
Adhiraj Singh 4710f6603a fix: delete chat on legacy 2021-12-21 17:21:25 +05:30
Adhiraj Singh c87d8b8129 refactor: update chat modifications to be uniform across MD + legacy 2021-12-21 10:53:39 +05:30
Adhiraj Singh 677f50baaa feat: add contacts to chats.set event 2021-12-20 13:59:04 +05:30
Adhiraj Singh e9d90aa0a5 fix: remove dup eventemitter 2021-12-20 13:58:39 +05:30
Adhiraj Singh ed4f234fd8 fix: buttonText should be optional 2021-12-19 22:40:16 +05:30
Rajeh Taher d62db2bbd6 Added List message support and removed "saving auth state" (#1048)
* Added template support and footers for buttons & templates

* Template message readme

* got rid of "saving auth state" and added lists

* added body

* Update README.md
2021-12-19 22:29:35 +05:30
Adhiraj Singh f61f553e01 chore: more unification of legacy APIs
1. unify waitForConnectionUpdate
2. unify printing QR in terminal
2021-12-18 22:18:51 +05:30
Adhiraj Singh be0e2210d9 Merge branch 'multi-device' into multi-device-legacy 2021-12-17 19:28:00 +05:30
Adhiraj Singh 19a9980492 feat: add legacy connection 2021-12-17 19:27:04 +05:30
Adhiraj Singh 38a44be006 perf: experimental do not use fs for enc stream 2021-12-17 18:27:03 +05:30
Adhiraj Singh d15dd6e1d2 feat: add "direct_path" to media messages 2021-12-13 17:31:20 +05:30
Adhiraj Singh f284217d35 feat: implement transactions on auth state 2021-12-11 18:28:07 +05:30
Adhiraj Singh 2b8256d56b feat: cleaner auth state management + store SK keys
!BREAKING_CHANGE
2021-12-11 17:54:38 +05:30
Adhiraj Singh 792c4bf0a4 feat: add custom host names 2021-12-11 11:32:12 +05:30
Guilherme França b68ab8b8ac refactor: change pttAudio param to ptt in send audio message as a voice note (#1002) 2021-12-11 00:13:03 +05:30
Adhiraj Singh 49e7ad4b25 fix: typeerror on some group create 2021-12-07 22:09:18 +05:30
Adhiraj Singh 78fd72c8e5 feat: implement message retry handling
so if a message fails to decrypt on the other user's end -- it can be retried
2021-12-04 13:47:24 +05:30
Adhiraj Singh b5ac28d426 feat: implement partial media downloads 2021-12-02 11:38:24 +05:30
Rajeh Taher cd9c313e47 [MD] Added template support and footers for buttons & templates (#942)
* Added template support and footers for buttons & templates

* Template message readme
2021-11-30 10:40:54 +05:30
Maurilho Batista e810f2dec5 Add support for stream as media message input (#905)
* Add support for stream as media message input

* refactor: use async/await on readable toBuffer

* refactor: be more explicit about using a readable stream

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-11-26 10:30:15 +05:30
Adhiraj Singh 6e830c1e1b feat: enforce default timeout to prevent any hanging promises 2021-11-25 19:54:56 +05:30
Adhiraj Singh f5fcaa36f3 feat: (hopefully) correctly implement account timestamp sync 2021-11-25 13:52:18 +05:30
Adhiraj Singh c07c013a90 refactor: specify pin mutation with boolean 2021-11-25 13:51:43 +05:30
Adhiraj Singh 032b2a314b refactor: include full sync action in chatmutation 2021-11-25 13:37:05 +05:30
Adhiraj Singh 7b42fa5a54 fix: correct operation type on chat patch 2021-11-25 00:37:44 +05:30
Adhiraj Singh efc7dffbeb refactor: cleaner & faster app state sync management
1. Is orders of magnitude faster than the previous edition
2. Stores lesser data, so more memory efficient
3. This breaks the current app state in baileys, but baileys will auto-resync & update the state
2021-11-24 20:04:36 +05:30
Adhiraj Singh d523bf8981 feat: detect when multi-device beta not joined 2021-11-20 17:20:06 +05:30
Adhiraj Singh 3d0704a317 feat: cleaner auth state management
1. removes the "auth-state.update" event since it was bloated and fairly unnecessary
2. adds "creds.update" event that only sends the updated properties of the auth credentials
3. ensure the auth creds are not mutated anywhere, but only with the "creds.update" event
4. Separates the signal credentials from the auth credentials (kinda in progress)
5. in memory key store requires a save function to let one know when to save the keys

!BREAKING_CHANGE
2021-11-20 16:21:56 +05:30
Adhiraj Singh 3adeb2ed6b chore: use interface instead of full type in auth 2021-11-19 21:46:48 +05:30