Commit Graph

52 Commits

Author SHA1 Message Date
Adhiraj Singh 8c37ccf525 fix: tsc error 2021-12-23 10:12:29 +05:30
nanda ee3486124d Fix: fetchBlocklist (#1042) 2021-12-22 22:48:40 +05:30
Adhiraj Singh a9373fa0cd refactor: cleaner + faster app state sync 2021-12-22 21:37:39 +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 c87d8b8129 refactor: update chat modifications to be uniform across MD + legacy 2021-12-21 10:53:39 +05:30
Adhiraj Singh dbed7fef74 chore: add profile picture timeout 2021-12-20 12:36:32 +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
LyFE ca12da6269 fix updateBlockStatus,fetchPrivacySettings (#1034)
* fix updateBlockStatus

* fix fetchPrivacySettings

* Update chats.ts
2021-12-16 23:49:48 +05:30
Adhiraj Singh a21e3b0bac perf: put main app state sync in transaction 2021-12-12 11:26:19 +05:30
Adhiraj Singh 2b8256d56b feat: cleaner auth state management + store SK keys
!BREAKING_CHANGE
2021-12-11 17:54:38 +05:30
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 a8decb9c11 docs: add some comments for "chatModify" + logging for app patch 2021-11-29 23:57:30 +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 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 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 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 a417d6dc5a fix: return mutations on patch 2021-11-25 00:38:13 +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 e222ec4151 refactor: use only "getAppStateSyncKey" in syncd patch 2021-11-23 12:17:57 +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 72889551b9 feat: resync main app state on new key 2021-11-19 17:43:14 +05:30
Adhiraj Singh 79100a3164 feat: export resyncmainappstate 2021-11-19 17:41:57 +05:30
Adhiraj Singh bb5f13d188 fix: mutex app state sync to prevent race conditions that log connection out 2021-11-18 11:30:35 +05:30
Adhiraj Singh b1eab17409 temp: comment out account sync
Not sure if this is correctly implemented
2021-11-11 15:21:51 +05:30
Adhiraj Singh 070722fcac fix: log failed app syncs 2021-11-08 21:47:49 +05:30
Adhiraj Singh ba453a588b feat: implement external patch parsing + app state sync on login 2021-11-08 15:07:25 +05:30
Adhiraj Singh 85574d1d79 Revert "fix: remove redundant collectionSync"
This reverts commit e547d85f98.
2021-11-08 00:18:59 +05:30
Adhiraj Singh 6eaed69470 fix: remove blocklist console log 2021-11-08 00:18:40 +05:30
Adhiraj Singh d796b286a6 feat: implement account sync 2021-11-08 00:18:29 +05:30
Adhiraj Singh 60d3be460b chore: log when state sync fails 2021-11-07 19:05:58 +05:30
Adhiraj Singh e547d85f98 fix: remove redundant collectionSync 2021-11-07 19:05:21 +05:30
Adhiraj Singh 5a33fd85a4 fix: read receipts 2021-11-06 15:41:49 +05:30
Adhiraj Singh d0b11dadbf add high res picture fetch 2021-10-23 10:07:55 +05:30
Adhiraj Singh d3b7ffecf2 code cleanup 2021-10-11 09:36:17 +05:30
Adhiraj Singh edc10d0923 resync from scratch if current sync fails 2021-10-08 10:48:22 +05:30
Adhiraj Singh 919781488b upsert contact on app sync patch + add message.participant to full message 2021-10-04 09:48:33 +05:30
Adhiraj Singh e84002d807 add emitOwnEvents 2021-10-01 13:46:19 +05:30
Adhiraj Singh 173d1ddf8b implement chat modifications 2021-09-29 12:31:22 +05:30
Adhiraj Singh 1a83a4c6d4 nicer patch API 2021-09-28 19:33:21 +05:30
Adhiraj Singh fdfe310fdf implement encrypting app patches 2021-09-28 19:22:39 +05:30
Adhiraj Singh 07561bec53 normalize jid before profile picture 2021-09-27 15:58:12 +05:30
Adhiraj Singh 7b7fcafb03 privacy setting returns correctly 2021-09-26 22:36:28 +05:30
Adhiraj Singh 23101f87a1 move appstatesynckey to keys 2021-09-26 12:35:56 +05:30