Commit Graph

666 Commits

Author SHA1 Message Date
HUGEIT
903871d180 potential fix for QR scan. the server may expect these messages to be sent on reconnect after scan (#959)
* potential fix for QR scan. the server may expect these messages to be sent on reconnect after scan.

* refactor: extract dictionary reduce code into utility

* refactor: convert the props + abt send req to somewhat useful query

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-12-03 18:40:26 +05:30
Adhiraj Singh
d9cfed64ff fix: bad request on sending messages in some cases
Issue source found out by @jackcokk
2021-12-03 15:20:17 +05:30
Adhiraj Singh
7d89b9bb95 chore: update WA version 2021-12-03 15:17:11 +05:30
Adhiraj Singh
9f8223d46b fix: 10x better compression for image thumbs 2021-12-02 12:13:45 +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
Adhiraj Singh
a8decb9c11 docs: add some comments for "chatModify" + logging for app patch 2021-11-29 23:57:30 +05:30
Adhiraj Singh
0d27fc467b feat: add sanity check for chat modifications 2021-11-29 23:57:07 +05:30
Adhiraj Singh
5e94a2b6e3 fix: pin modification 2021-11-26 13:08:50 +05:30
Adhiraj Singh
b9d37a06a3 fix: incorrect updates being forwarded to messages.update 2021-11-26 10:31:46 +05:30
Adhiraj Singh
6786576d13 style: fix indentation 2021-11-26 10:30:59 +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
b91a1cbcf3 fix: possible leak on waitForMessage 2021-11-25 19:51:49 +05:30
Adhiraj Singh
1f8663092f fix: receipt not being sent on empty message 2021-11-25 15:41:34 +05:30
azudin
841a129019 Multi device - Clean up typos and replace conn to sock (#916)
* Update README.md

* Update README.md

Change updatePresence to sendPresenceUpdate

* Update README.md

clean up typos and replace conn to sock

* Update README.md

clean up typos and replace conn to sock to standardize with existing example
2021-11-25 15:37:34 +05:30
Adhiraj Singh
eac75afbe2 fix: do not call REMOVE op for mutations 2021-11-25 15:21:33 +05:30
Adhiraj Singh
a07a63fa28 perf: single process event for processSyncActions 2021-11-25 15:20:47 +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
09b3815d89 fix: handle case with 0 app state sync keys 2021-11-25 13:42:58 +05:30
Adhiraj Singh
396e1d2e95 cleanup: remove redundant sync key request handler 2021-11-25 13:42:44 +05:30
Adhiraj Singh
ddf6daba65 feat: implement pin chat modification 2021-11-25 13:37:05 +05:30
Adhiraj Singh
032b2a314b refactor: include full sync action in chatmutation 2021-11-25 13:37:05 +05:30
Adhiraj Singh
b3e0f26ec0 fix: typeerror on no messages provided 2021-11-25 13:37:05 +05:30
Adhiraj Singh
99619c4c42 refactor: less code duplication for timestamp 2021-11-25 13:37:05 +05:30
Adhiraj Singh
49f0f4080c docs: log new mutations in trace mode 2021-11-25 13:37:05 +05:30
Adhiraj Singh
25f76b2f66 refactor: more specific arguments for encode patch 2021-11-25 13:37:05 +05:30
Adhiraj Singh
669fcaa438 fix: ack all calls 2021-11-25 12:23:12 +05:30
Adhiraj Singh
a417d6dc5a fix: return mutations on patch 2021-11-25 00:38:13 +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
920e60815b feat: add newLTHashState util 2021-11-24 20:02:36 +05:30
Adhiraj Singh
983b28ba0e feat: implement "snapshot" resyncing 2021-11-24 18:48:00 +05:30
Adhiraj Singh
aae2b7a559 fix: resync all collections on mainappresync 2021-11-24 18:47:08 +05:30
Adhiraj Singh
aa3309db3c perf: do not resync on every reconnect 2021-11-24 18:46:38 +05:30
Adhiraj Singh
13ef870f3e style: remove useless variable in messages 2021-11-24 15:36:25 +05:30
Adhiraj Singh
3173e0d034 fix: media cache throwing error 2021-11-24 15:35:43 +05:30
Adhiraj Singh
b4332488b8 fix: LT hash computation failing
Was trying to remove a patch that was already removed, adding a check to ensure to only remove patches that are of the SET type
2021-11-23 12:23:25 +05:30
Adhiraj Singh
e222ec4151 refactor: use only "getAppStateSyncKey" in syncd patch 2021-11-23 12:17:57 +05:30
Adhiraj Singh
d2e3abfe49 fix: timestamp & other details not appearing + remove participant property from root message 2021-11-22 16:01:58 +05:30
Adhiraj Singh
d5e3d049c4 fix: add "offer" call ack 2021-11-22 00:16:22 +05:30
Adhiraj Singh
088bae44e8 fix: correctly map left group notification 2021-11-21 21:39:31 +05:30
Adhiraj Singh
27cf3954e8 fix: account for 0 messages in stanza 2021-11-21 16:52:59 +05:30
Adhiraj Singh
1cd96ad039 fix: incorrect group owner 2021-11-21 16:10:38 +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
c2c27a5dea fix: experimental patch to correctly identify end of offline notifications 2021-11-20 13:39:56 +05:30
Adhiraj Singh
7d174ca77b fix: "receivedPendingNotifications" not firing on zero offline notifications 2021-11-19 22:00:37 +05:30
Adhiraj Singh
49da0e4e71 fix: remove "connection.update" listener from ev instead of ws 2021-11-19 21:47:51 +05:30